Skip to content

Update WASI to 0.3.0, enable component-model-async#13612

Merged
alexcrichton merged 3 commits into
bytecodealliance:mainfrom
alexcrichton:wasip3
Jun 12, 2026
Merged

Update WASI to 0.3.0, enable component-model-async#13612
alexcrichton merged 3 commits into
bytecodealliance:mainfrom
alexcrichton:wasip3

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

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.

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.
@alexcrichton alexcrichton requested review from a team as code owners June 11, 2026 19:49
@alexcrichton alexcrichton requested review from fitzgen and pchickey and removed request for a team June 11, 2026 19:49
@alexcrichton

Copy link
Copy Markdown
Member Author

I'll additionally clarify that my intent is to backport this to the release-46.0.0 branch upon merging to main to have Wasmtime 46.0.0 be the first with component-model-async/WASIp3 support.

@github-actions github-actions Bot added wasi Issues pertaining to WASI wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:config Issues related to the configuration of Wasmtime labels Jun 11, 2026
@github-actions

Copy link
Copy Markdown

Label Messager: wasmtime:config

It looks like you are changing Wasmtime's configuration options. Make sure to
complete this check list:

  • If you added a new Config method, you wrote extensive documentation for
    it.

    Details

    Our documentation should be of the following form:

    Short, simple summary sentence.
    
    More details. These details can be multiple paragraphs. There should be
    information about not just the method, but its parameters and results as
    well.
    
    Is this method fallible? If so, when can it return an error?
    
    Can this method panic? If so, when does it panic?
    
    # Example
    
    Optional example here.
    
  • If you added a new Config method, or modified an existing one, you
    ensured that this configuration is exercised by the fuzz targets.

    Details

    For example, if you expose a new strategy for allocating the next instance
    slot inside the pooling allocator, you should ensure that at least one of our
    fuzz targets exercises that new strategy.

    Often, all that is required of you is to ensure that there is a knob for this
    configuration option in wasmtime_fuzzing::Config (or one
    of its nested structs).

    Rarely, this may require authoring a new fuzz target to specifically test this
    configuration. See our docs on fuzzing for more details.

  • If you are enabling a configuration option by default, make sure that it
    has been fuzzed for at least two weeks before turning it on by default.


Details

To modify this label's message, edit the .github/label-messager/wasmtime-config.md file.

To add new label messages or remove existing label messages, edit the
.github/label-messager.json configuration file.

Learn more.

@ricochet ricochet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One very minor nit, otherwise lgtm including handling exit-with-code

Comment thread src/common.rs Outdated
@@ -1,13 +1,13 @@
package wasi:http@0.3.0-rc-2026-03-15;
package wasi:http@0.3.0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is missing the changes from https://github.com/WebAssembly/WASI/pull/920/changes - not sure where along the chain those got missed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note none of the inner wit doc comments are reflected in the resolved wit (old or new).

@alexcrichton alexcrichton added this pull request to the merge queue Jun 12, 2026
Merged via the queue into bytecodealliance:main with commit 546c294 Jun 12, 2026
51 checks passed
@alexcrichton alexcrichton deleted the wasip3 branch June 12, 2026 18:51
alexcrichton added a commit to WebAssembly/wasi-libc that referenced this pull request Jun 12, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasi Issues pertaining to WASI wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:config Issues related to the configuration of Wasmtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants