You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that files that import "C" have an implicit cgobuild constraint.
That said, the compiler's error message could be better when compiling with CGO_ENABLED=1 for js/wasm.
example.com$ GOOS=js GOARCH=wasm go build
package example.com: build constraints exclude all Go files in /tmp/tmp.MKI8rv27eJ/example.com
example.com$ GOOS=js GOARCH=wasm go env CGO_ENABLED
0
example.com$ GOOS=js GOARCH=wasm CGO_ENABLED=1 go build
# runtime/cgo
unknown ptrSize for $GOARCH "wasm"
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Code
Build
Error
What operating system and processor architecture are you using (
go env
)?What did you do?
I was going to compile the go file to a wasm file, but it showed error.
What did you expect to see?
the go file will be compiled to a wasm file
What did you see instead?
The text was updated successfully, but these errors were encountered: