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
tinygo can't compile GO app to wasm file #4222
Labels
wasm
WebAssembly
Comments
iltatarin
changed the title
tinygo can't compile wasm file
tinygo can't compile GO app to wasm file
Apr 9, 2024
WASI preview 1 does not provide enough functions to implement a full HTTP server. More info: https://go.dev/blog/wasi#limitations You can use the main Go compiler with stealthrocket/net if your target wasm runtime is wasmedge. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I want compile my golang app to wasm file I get errors:
/go/pkg/mod/golang.org/x/[email protected]/http2/transport.go:26:2: package net/http/httptrace is not in std (/root/.cache/tinygo/goroot-646f794f1c545d78f790d72fe3114fa1e0882f6cfab7deac934ba87ff42a6934/src/net/http/httptrace) /go/pkg/mod/google.golang.org/[email protected]/internal/transport/proxy.go:29:2: package net/http/httputil is not in std (/root/.cache/tinygo/goroot-646f794f1c545d78f790d72fe3114fa1e0882f6cfab7deac934ba87ff42a6934/src/net/http/httputil)
Golang version: go version go1.21.6 linux/amd64
tinygo version: tinygo version 0.31.2 linux/amd64 (using go version go1.21.6 and LLVM version 17.0.1)
My command:
tinygo build --no-debug -scheduler=none -target=wasi -o filter.wasm cmd/filter.go
If I use tinygo version 0.29 I get errors:
The text was updated successfully, but these errors were encountered: