Proposal
The support for wasm32-wasi-preview1-threads target was added to a compiler as part of the PR: rust-lang/rust#112922. The target extends wasm32-wasi target (soon becoming a wasm32-wasi-preview1 target: rust-lang/stdarch#1417) by adding support for spawning threads based on the wasi-threads proposal. The wasm32-wasi-preview1-threads target uses the same source code as wasm32-wasi target for stdlib, but it enables additional flags (+atomics,+bulk-memory,+mutable-globals) and links against wasm32-wasi-threads libraries from WASI-SDK.
It was decided by the community that wasi-threads proposal will not proceed to the next stage as the threading support will be in the future added to Core WebAssembly standard (WIP proposal: https://github.com/abrown/thread-spawn). Given the early stage of the new, thread-spawn proposal, the wasi-threads proposal will be finalized even though it doesn't become part of WASI standard (so teams with a need for threading support can use it for the time being).
We propose moving the target to tier 2, given that:
The reason behind adding a new target as oppose to using existing wasm32-wasi / wasm32-wasi-preview1 was well explained in the original MCP: #574
There were also concerns raised by the community regarding adding this target in general, but they are addressed below:
wasi-threads is not part of the standard, and thus, experimental - as mentioned above, the proposal wasn't included in the standard, but there's an ongoing effort to finalize it and keep it as an extension of WASI snapshot preview1.
- we might end-up with multiple WASM targets for supporting various set of features - Threads support is quite different to other extensions, as enabling it affects the implementation of the standard library. There are not many proposals that affect either the implementation of standard library or the ABI, so we don't think it is a concern.
We have reviewed the requirements for the tier 2 targets. The target meets all of the requirements except for documentation gaps which will be added if the MCP is accepted.
Our team at Amazon Prime Video will run tests regularly and fix build failures.
Mentors or Reviewers
@pnkfelix
Process
The main points of the Major Change Process are as follows:
You can read more about Major Change Proposals on forge.
Comments
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.
Proposal
The support for
wasm32-wasi-preview1-threadstarget was added to a compiler as part of the PR: rust-lang/rust#112922. The target extendswasm32-wasitarget (soon becoming awasm32-wasi-preview1target: rust-lang/stdarch#1417) by adding support for spawning threads based on the wasi-threads proposal. Thewasm32-wasi-preview1-threadstarget uses the same source code aswasm32-wasitarget for stdlib, but it enables additional flags (+atomics,+bulk-memory,+mutable-globals) and links againstwasm32-wasi-threadslibraries from WASI-SDK.It was decided by the community that
wasi-threadsproposal will not proceed to the next stage as the threading support will be in the future added to Core WebAssembly standard (WIP proposal: https://github.com/abrown/thread-spawn). Given the early stage of the new,thread-spawnproposal, thewasi-threadsproposal will be finalized even though it doesn't become part of WASI standard (so teams with a need for threading support can use it for the time being).We propose moving the target to tier 2, given that:
wasm32-wasi+ threads #574 (and renamed here: Renamewasm32-wasitarget towasm32-wasi-preview1#607), but it was decided during the review of WASI threads, implementation of wasm32-wasi-preview1-threads target rust#112922 to start as Tier 3 targetwasi-threadswas already implemented in at least 4 different WASM runtimes: Wasmtime (behind--wasi-modules=experimental-wasi-threadsflag), WAMR, wasmer and toywasmWASI-SDKalready relies onwasi-threadsproposal for thePthreadsimplementationThe reason behind adding a new target as oppose to using existing
wasm32-wasi/wasm32-wasi-preview1was well explained in the original MCP: #574There were also concerns raised by the community regarding adding this target in general, but they are addressed below:
wasi-threadsis not part of the standard, and thus, experimental - as mentioned above, the proposal wasn't included in the standard, but there's an ongoing effort to finalize it and keep it as an extension of WASI snapshot preview1.We have reviewed the requirements for the tier 2 targets. The target meets all of the requirements except for documentation gaps which will be added if the MCP is accepted.
Our team at Amazon Prime Video will run tests regularly and fix build failures.
Mentors or Reviewers
@pnkfelix
Process
The main points of the Major Change Process are as follows:
@rustbot second.-C flag, then full team check-off is required.@rfcbot fcp mergeon either the MCP or the PR.You can read more about Major Change Proposals on forge.
Comments
This issue is not meant to be used for technical discussion. There is a Zulip stream for that. Use this issue to leave procedural comments, such as volunteering to review, indicating that you second the proposal (or third, etc), or raising a concern that you would like to be addressed.