Skip to content

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