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 support for building wazero with GOARCH=wasm #1526

Closed
supermigo opened this issue Jun 17, 2023 · 5 comments
Closed

Add support for building wazero with GOARCH=wasm #1526

supermigo opened this issue Jun 17, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@supermigo
Copy link

../../../../gosrc/pkg/mod/github.com/tetratelabs/[email protected]/internal/sysfs/open_file_js.go:11:81: undefined: File
../../../../gosrc/pkg/mod/github.com/tetratelabs/[email protected]/internal/sysfs/open_file_js.go:16:12: undefined: O_DIRECTORY
../../../../gosrc/pkg/mod/github.com/tetratelabs/[email protected]/internal/sysfs/open_file_js.go:16:26: undefined: O_NOFOLLOW
this error not support wasm

@supermigo supermigo added the bug Something isn't working label Jun 17, 2023
@achille-roussel
Copy link
Collaborator

Hello @supermigo

Thanks for reporting tho we're going to need a bit more details from you to be able to help address the issue.

Would you be able to resubmit the issue and follow the bug reporting template?

@mathetake
Copy link
Member

mathetake commented Jun 18, 2023

I believe this is the error when we try to build downstream user of wazero with GOOS=js GOARCH=wasm:

$ GOOS=js GOARCH=wasm go build ./...
# github.com/tetratelabs/wazero/internal/sysfs
internal/sysfs/open_file_js.go:11:81: undefined: File
internal/sysfs/open_file_js.go:16:12: undefined: O_DIRECTORY
internal/sysfs/open_file_js.go:16:26: undefined: O_NOFOLLOW
internal/sysfs/sock.go:131:15: undefined: syscall.SHUT_RD
internal/sysfs/sock.go:133:15: undefined: syscall.SHUT_WR
internal/sysfs/sock.go:135:15: undefined: syscall.SHUT_RDWR
internal/sysfs/sock.go:153:28: undefined: syscall.SHUT_RDWR

@mathetake mathetake changed the title wasm error Add support for building wazero with GOOS=wasm GOARCH=js Jun 18, 2023
@mathetake
Copy link
Member

GOOS=wasip1 GOARCH=wasm gotip build ./...
# github.com/tetratelabs/wazero/internal/fsapi
internal/fsapi/constants.go:10:24: undefined: syscall.O_DIRECTORY
internal/fsapi/constants.go:11:24: undefined: syscall.O_NOFOLLOW
internal/fsapi/constants.go:12:24: undefined: syscall.O_NONBLOCK

Also found that wasip1 doesn't build

@codefromthecrypt
Copy link
Contributor

sounds like we are missing an _unsupported.go file somewhere.

@mathetake mathetake changed the title Add support for building wazero with GOOS=wasm GOARCH=js Add support for building wazero with GOARCH=wasm Jul 9, 2023
@mathetake
Copy link
Member

seems that this has been resolved together with #1578

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants