-
Notifications
You must be signed in to change notification settings - Fork 203
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 wasm32-wasi-preview2
target
#457
Conversation
Currently, this is identical to the `wasm32-wasi` in all but name. See WebAssembly#449 for the next step, which is to incrementally add Preview 2 features, e.g. `wasi-sockets`. Per the discussion in that PR, I've split the `wasi-sysroot/include` directory into per-target directories. Eventually, we'll want to build a separate sysroot for each target, but there's currently uncertainty about how to configure the default sysroot for e.g. clang, so we're not tackling that yet. See also WebAssembly#447 for further details. Signed-off-by: Joel Dice <[email protected]>
Is the plan the binaries built with |
Yes, initially. See the |
Great. Off-topic-followup: I'm curious how |
Yes, you could use the module directly without any adapter or Also I believe @cpetig has experimented with building the adapter as a .a file and linking it using |
Awesome! (It sounds like we will be able to use |
Sounds great. Note that you can also use jco to run Preview 2 components on the web. |
Any feedback on the PR itself? I was thinking I'd add the generated WIT bindings and Makefile support for regenerating them in a separate PR, but I could add them to this one if desired. |
I love small PRs so if you can separate them like this I'd appreciate it. |
lgtm but I've added @sunfishcode as a reviewer, since I don't know the wit-component + adapter stuff in the test directory works. Also, want to make sure @sunfishcode is OK with the separate multi-arch include directory approach? |
Looks good to me. I expect the adapter logic there will evolve, but this looks like a good starting point. The separate multi-arch include setup seems good to me. |
This updates `wasi-libc` to include WebAssembly/wasi-libc#457, which adds preliminary support for the new `wasm32-wasi-preview2` target. It also adds support for testing the new target using Wasmtime 16.0.0 and `wit-component`. Signed-off-by: Joel Dice <[email protected]>
This updates `wasi-libc` to include WebAssembly/wasi-libc#457, which adds preliminary support for the new `wasm32-wasi-preview2` target. It also adds support for testing the new target using Wasmtime 16.0.0 and `wit-component`. Note that Wasmtime produces different output when reporting errors for Preview 2 components than it does for Preview 1 modules, so I've added a few .expected files specific to Preview 2. Signed-off-by: Joel Dice <[email protected]>
* build and test `wasm32-wasi-preview2` target This updates `wasi-libc` to include WebAssembly/wasi-libc#457, which adds preliminary support for the new `wasm32-wasi-preview2` target. It also adds support for testing the new target using Wasmtime 16.0.0 and `wit-component`. Note that Wasmtime produces different output when reporting errors for Preview 2 components than it does for Preview 1 modules, so I've added a few .expected files specific to Preview 2. Signed-off-by: Joel Dice <[email protected]> * test all three targets Signed-off-by: Joel Dice <[email protected]> --------- Signed-off-by: Joel Dice <[email protected]>
Currently, this is identical to the
wasm32-wasi
in all but name. See #449 for the next step, which is to incrementally add Preview 2 features, e.g.wasi-sockets
. Per the discussion in that PR, I've split thewasi-sysroot/include
directory into per-target directories. Eventually, we'll want to build a separate sysroot for each target, but there's currently uncertainty about how to configure the default sysroot for e.g. clang, so we're not tackling that yet.See also #447 for further details.