Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add wasi directives for tinygo #114

Merged
merged 1 commit into from
Aug 1, 2023
Merged

Add wasi directives for tinygo #114

merged 1 commit into from
Aug 1, 2023

Conversation

alexkashintsev-tomtom
Copy link
Contributor

Goal
Adding WASI directives to be able to compile with tinygo (and use it with WASM for Envoy).

Without these directives for compiler, compiling with tinygo v0.28.1 on Darwin fails with:

tinygo build -o main.wasm -scheduler=none -target=wasi main.go
# golang.org/x/sys/unix
../../go/pkg/mod/golang.org/x/sys@v0.10.0/unix/syscall_linux.go:1901:64: undefined: syscall.Rlimit
../../go/pkg/mod/golang.org/x/sys@v0.10.0/unix/syscall_linux.go:1906:50: undefined: syscall.Rlimit
../../go/pkg/mod/golang.org/x/sys@v0.10.0/unix/syscall_linux.go:1906:79: undefined: syscall.Rlimit
../../go/pkg/mod/golang.org/x/sys@v0.10.0/unix/syscall_unix.go:595:17: undefined: syscall.Setrlimit
../../go/pkg/mod/golang.org/x/sys@v0.10.0/unix/syscall_unix.go:595:47: undefined: syscall.Rlimit

@alexkashintsev-tomtom
Copy link
Contributor Author

Sorry for spam, after double-checking we indeed need this directives to use maxmind with Tinygo.

@oschwald oschwald merged commit 9a0fd9e into oschwald:main Aug 1, 2023
@oschwald
Copy link
Owner

oschwald commented Aug 1, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants