forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docs/stabilization of wasm proposals (bytecodealliance#9434)
* Update docs/stabilization of wasm proposals This commit updates our documentation and documented status of various WebAssembly proposals. The goal of this commit it to explicitly list all requirements for each WebAssembly proposal in a way such that enabling a feature requires actively checking this table and performing effort to fill in. This is intended to mitigate GHSA-q8hx-mm92-4wvg where it was found that we were accidentally not fuzzing tail calls but had enabled it by default. This shuffles around some documentation, modernizes a bit, and notably tries to list out a green checkbox or red X for the status of various proposals. Notes for "holes" in the "on by default matrix" are also added. * Add a link to the GC tracking issue * Tweak the list of supported targets Android is listed in Tier 3 now
- Loading branch information
1 parent
964360a
commit a8998e7
Showing
5 changed files
with
161 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
# Wasm Proposals | ||
|
||
This document is intended to describe the current status of WebAssembly | ||
proposals in Wasmtime. For information about implementing a proposal in Wasmtime | ||
see the [associated | ||
documentation](./contributing-implementing-wasm-proposals.md). | ||
|
||
WebAssembly proposals that want to be [tier 2 or above](./stability-tiers.md) | ||
are required to check all boxes in this matrix. An explanation of each matrix | ||
column is below. | ||
|
||
## On-by-default proposals | ||
|
||
| Proposal | Phase 4 | Tests | Finished | Fuzzed | API | C API | | ||
|--------------------------|---------|-------|----------|--------|-----|-------| | ||
| [`mutable-globals`] | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | ||
| [`sign-extension-ops`] | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | ||
| [`nontrapping-fptoint`] | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | ||
| [`multi-value`] | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | ||
| [`bulk-memory`] | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | ||
| [`reference-types`] | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | ||
| [`simd`] | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | ||
| [`component-model`] | ❌[^1] | ✅ | ✅ | ⚠️[^2] | ✅ | ❌[^5]| | ||
| [`relaxed-simd`] | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | ||
| [`multi-memory`] | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | ||
| [`threads`] | ✅ | ✅ | ✅ | ❌[^3] | ✅ | ✅ | | ||
| [`tail-call`] | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | ||
| [`extended-const`] | ✅ | ✅ | ✅ | ❌[^4] | ✅ | ✅ | | ||
|
||
[^1]: The `component-model` proposal is not at phase 4 in the standardization | ||
process but it is still enabled-by-default in Wasmtime. | ||
[^2]: Various shapes of components are fuzzed but full-on fuzzing along the | ||
lines of `wasm-smith` are not implemented for components. | ||
[^3]: Fuzzing with threads is an open implementation question that is expected | ||
to get fleshed out as the [`shared-everything-threads`] proposal advances. | ||
[^4]: This was a mistake in Wasmtime's stabilization process. Support for | ||
[`extended-const`] is not yet implemented in `wasm-smith`. | ||
[^5]: Support for the C API for components is desired by many embedders but | ||
does not currently have anyone lined up to implement it. | ||
|
||
## Off-by-default proposals | ||
|
||
| Proposal | Phase 4 | Tests | Finished | Fuzzed | API | C API | | ||
|--------------------------|---------|-------|----------|--------|-----|-------| | ||
| [`memory64`] | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | | ||
| [`function-references`] | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ | | ||
| [`gc`] [^6] | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ | | ||
| [`wide-arithmetic`] | ❌ | ✅ | ✅ | ✅ | ✅ | ✅ | | ||
|
||
[^6]: There is also a [tracking | ||
issue](https://github.com/bytecodealliance/wasmtime/issues/5032) for the | ||
GC proposal. | ||
|
||
## Unsupported proposals | ||
|
||
* [`branch-hinting`] | ||
* [`exception-handling`] | ||
* [`flexible-vectors`] | ||
* [`memory-control`] | ||
* [`stack-switching`] | ||
* [`shared-everything-threads`] | ||
|
||
[`mutable-globals`]: https://github.com/WebAssembly/mutable-global/blob/master/proposals/mutable-global/Overview.md | ||
[`sign-extension-ops`]: https://github.com/WebAssembly/spec/blob/master/proposals/sign-extension-ops/Overview.md | ||
[`nontrapping-fptoint`]: https://github.com/WebAssembly/spec/blob/master/proposals/nontrapping-float-to-int-conversion/Overview.md | ||
[`multi-value`]: https://github.com/WebAssembly/spec/blob/master/proposals/multi-value/Overview.md | ||
[`bulk-memory`]: https://github.com/WebAssembly/bulk-memory-operations/blob/master/proposals/bulk-memory-operations/Overview.md | ||
[`reference-types`]: https://github.com/WebAssembly/reference-types/blob/master/proposals/reference-types/Overview.md | ||
[`simd`]: https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md | ||
[`tail-call`]: https://github.com/WebAssembly/tail-call/blob/main/proposals/tail-call/Overview.md | ||
[`branch-hinting`]: https://github.com/WebAssembly/branch-hinting | ||
[`exception-handling`]: https://github.com/WebAssembly/exception-handling | ||
[`extended-const`]: https://github.com/WebAssembly/extended-const | ||
[`flexible-vectors`]: https://github.com/WebAssembly/flexible-vectors | ||
[`memory-control`]: https://github.com/WebAssembly/memory-control | ||
[`stack-switching`]: https://github.com/WebAssembly/stack-switching | ||
[`shared-everything-threads`]: https://github.com/WebAssembly/shared-everything-threads | ||
[`memory64`]: https://github.com/WebAssembly/memory64/blob/master/proposals/memory64/Overview.md | ||
[`multi-memory`]: https://github.com/WebAssembly/multi-memory/blob/master/proposals/multi-memory/Overview.md | ||
[`threads`]: https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md | ||
[`component-model`]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/Explainer.md | ||
[`relaxed-simd`]: https://github.com/WebAssembly/relaxed-simd/blob/main/proposals/relaxed-simd/Overview.md | ||
[`function-references`]: https://github.com/WebAssembly/function-references/blob/main/proposals/function-references/Overview.md | ||
[`wide-arithmetic`]: https://github.com/WebAssembly/wide-arithmetic/blob/main/proposals/wide-arithmetic/Overview.md | ||
[`gc`]: https://github.com/WebAssembly/gc | ||
|
||
## Feature requirements | ||
|
||
For each column in the above tables, this is a further explanation of its meaning: | ||
|
||
* **Phase 4** - The proposal must be in phase 4, or greater, of [the | ||
WebAssembly standardization process][phases]. | ||
|
||
* **Tests** - All spec tests must be passing in Wasmtime and where appropriate | ||
Wasmtime-specific tests, for example for the API, should be passing. Tests | ||
must pass at least for Cranelift on all [tier 1](./stability-tiers.md) | ||
platforms, but missing other platforms is otherwise acceptable. | ||
|
||
* **Finished** - No open questions, design concerns, or serious known bugs. The | ||
implementation should be complete to the extent that is possible. Support | ||
must be implemented for all [tier 1](./stability-tiers.md) targets and | ||
compiler backends. | ||
|
||
* **Fuzzed** - Has been fuzzed for at least a week minimum. We are also | ||
confident that the fuzzers are fully exercising the proposal's functionality. | ||
|
||
> For example, it would *not* have been enough to simply enable reference | ||
> types in the `compile` fuzz target to enable that proposal by | ||
> default. Compiling a module that uses reference types but not instantiating | ||
> it nor running any of its functions doesn't exercise any of the GC | ||
> implementation and does not run the inline fast paths for `table` operations | ||
> emitted by the JIT. Exercising these things was the motivation for writing | ||
> the custom fuzz target for `table.{get,set}` instructions. | ||
* **API** - The proposal's functionality is exposed in the `wasmtime` crate's | ||
API. At minimum this is `Config::wasm_the_proposal` but proposals such as | ||
[`gc`] also add new types to the API. | ||
|
||
* **C API** - The proposal's functionality is exposed in the C API. | ||
|
||
[phases]: https://github.com/WebAssembly/meetings/blob/master/process/phases.md |