Update WASI to 0.3.0, enable component-model-async#13612
Conversation
This commit updates the vendored WASI WITs for the 0.3.0 release of WASI to this repository, updating the supported version of WASI that `wasmtime-wasi` runs. This additionally enables the `component-model-async` wasm feature by default in Wasmtime, along with `-Sp3` on the CLI as well. This is intended to be a comprehensive "turn WASI 0.3.0 on by default" PR which touches a few different locations. Apart from changing version numbers some minor changes made here are: * Default enablement of the wasm `cm-async` feature is now conditional on `Config::concurrency_support` in addition to the compile-time feature. This means that if `concurrency_support` is disabled the default will be that `cm-async` is disabled. * The `tests/wasi.rs` test suite running the upstream `wasi-testsuite` repository is updated to expect failures for all WASIp3 tests due to the import versions changing. This resulted in a necessary restructuring of the test to handle a few more failures in a few more locations to ensure that "should fail tests" are correctly marked as passing when they indeed do fail.
|
I'll additionally clarify that my intent is to backport this to the release-46.0.0 branch upon merging to |
Label Messager: wasmtime:configIt looks like you are changing Wasmtime's configuration options. Make sure to
DetailsTo modify this label's message, edit the To add new label messages or remove existing label messages, edit the |
ricochet
left a comment
There was a problem hiding this comment.
One very minor nit, otherwise lgtm including handling exit-with-code
| @@ -1,13 +1,13 @@ | |||
| package wasi:http@0.3.0-rc-2026-03-15; | |||
| package wasi:http@0.3.0; | |||
There was a problem hiding this comment.
This file is missing the changes from https://github.com/WebAssembly/WASI/pull/920/changes - not sure where along the chain those got missed
There was a problem hiding this comment.
I see it on main: https://github.com/WebAssembly/WASI/blob/main/proposals/http/wit/worlds.wit#L35
None of the inner comments of the worlds are reflected here whether new or old.
There was a problem hiding this comment.
This is a wasm-tools limitation where WorldItem::Interface doesn't have a docs field so when going from wit to binary, we loose those docs. A doc comment on the service world would persist.
There was a problem hiding this comment.
Agreed yeah looks like this is a bug in wasm-tools, and thanks @ricochet for bytecodealliance/wasm-tools#2540! In the meantime the docs here don't actually get plumbed anywhere else, so this is mostly just a minor in-repo thing for us in this vendoring.
| /// in more specific worlds such as `wasi:http/middleware`. | ||
| @since(version = 0.3.0-rc-2026-03-15) | ||
| @since(version = 0.3.0) | ||
| world service { |
There was a problem hiding this comment.
Note none of the inner wit doc comments are reflected in the resolved wit (old or new).
This commit is intended to couple the WASI subgroup's decision today to stamp 0.3.0 and ship it. This updates the vendored WITs here to their 0.3.0 versions which means that the WASIp3 version of libc will now be built against this version. I've tested this against a build of bytecodealliance/wasmtime#13612 to verify these changes. This has a few minor changes as well such as: * The implementation of `exit` in libc now uses `exit_with_code` instead of `exit` where possible. This is only done if the `status` being exited with fits within the `u8` that the WASI interface allows. * Before cancelling/deleting the timeout task in `poll` it's removed from the `waitable-set` to accommodate upstream changes in Wasmtime and avoid a trap.
This commit updates the vendored WASI WITs for the 0.3.0 release of WASI to this repository, updating the supported version of WASI that
wasmtime-wasiruns. This additionally enables thecomponent-model-asyncwasm feature by default in Wasmtime, along with-Sp3on the CLI as well. This is intended to be a comprehensive "turn WASI 0.3.0 on by default" PR which touches a few different locations.Apart from changing version numbers some minor changes made here are:
Default enablement of the wasm
cm-asyncfeature is now conditional onConfig::concurrency_supportin addition to the compile-time feature. This means that ifconcurrency_supportis disabled the default will be thatcm-asyncis disabled.The
tests/wasi.rstest suite running the upstreamwasi-testsuiterepository is updated to expect failures for all WASIp3 tests due to the import versions changing. This resulted in a necessary restructuring of the test to handle a few more failures in a few more locations to ensure that "should fail tests" are correctly marked as passing when they indeed do fail.