Skip to content

Add a new wasm32-wasip3 target to Rust - #147205

Merged
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:wasip3
Oct 7, 2025
Merged

Add a new wasm32-wasip3 target to Rust#147205
bors merged 1 commit into
rust-lang:masterfrom
alexcrichton:wasip3

Conversation

@alexcrichton

Copy link
Copy Markdown
Member

This commit adds a new tier 3 target to rustc, wasm32-wasip3. This follows in the footsteps of the previous wasm32-wasip2 target and is used to represent binding to the WASIp3 set of APIs managed by the WASI subgroup to the WebAssembly Community Group.

As of now the WASIp3 set of APIs are not finalized nor standardized. They're in the process of doing so and the current trajectory is to have the APIs published in December of this year. The goal here is to get the wheels turning in Rust to have the target in a
more-ready-than-nonexistent state by the time this happens in December.

For now the wasm32-wasip3 target looks exactly the same as wasm32-wasip2 except that target_env = "p3" is specified. This indicates to crates in the ecosystem that WASIp3 APIs should be used, such as the wasip3 crate. Over time this target will evolve as implementation in guest toolchains progress, notably:

  • The standard library will use WASIp3 APIs natively once they're finalized in the WASI subgroup.
  • Support through wasi-libc will be updated to use WASIp3 natively which Rust will then transitively use.
  • Longer-term, features such as cooperative multithreading will be added to the WASIp3-track of targets to enable using std::thread, for example, on this target.

These changes are all expected to be non-breaking changes for users of this target. Runtimes supporting WASIp3, currently Wasmtime and Jco, support WASIp2 APIs as well and will work with components whether or not they import WASIp2, both WASIp2 and WASIp3, or just WASIp3 APIs. This means that changing the internal implementation details of libstd over time is expected to be a non-breaking change.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants