Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

12.2 KB
Raw Blame

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.

WebAssembly proposals that want to be tier 1 are required to check all boxes in this matrix. An explanation of each matrix column is below.

The emoji legend is:

  • βœ… - fully supported
  • 🚧 - work-in-progress
  • ❌ - not supported yet

Tier 1 WebAssembly Proposals

Proposal Phase 4 Tests Finished Fuzzed API C API
mutable-globals βœ… βœ… βœ… βœ… βœ… βœ…
sign-extension-ops βœ… βœ… βœ… βœ… βœ… βœ…
nontrapping-fptoint βœ… βœ… βœ… βœ… βœ… βœ…
multi-value βœ… βœ… βœ… βœ… βœ… βœ…
bulk-memory βœ… βœ… βœ… βœ… βœ… βœ…
reference-types βœ… βœ… βœ…[^4] βœ… βœ… βœ…
simd βœ… βœ… βœ… βœ… βœ… βœ…
component-model ❌[^1] βœ… βœ… 🚧[^2] βœ… 🚧[^3]
relaxed-simd βœ… βœ… βœ…[^4] βœ… βœ… βœ…
multi-memory βœ… βœ… βœ… βœ… βœ… βœ…
tail-call βœ… βœ… βœ…[^4] βœ… βœ… βœ…
extended-const βœ… βœ… βœ… βœ… βœ… βœ…
memory64 βœ… βœ… βœ… βœ… βœ… βœ…
function-references βœ… βœ… βœ…[^4] βœ… βœ… βœ…
gc βœ… βœ… βœ…[^4] βœ… βœ… βœ…
exception-handling βœ… βœ… βœ…[^4] βœ… βœ… βœ…
wide-arithmetic βœ… βœ… βœ…[^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]: The component model is mostly supported in the C API but gaps remain. [^4]: Winch does not yet support this proposal at Tier 1.

Tier 2 WebAssembly Proposals

Proposal Phase 4 Tests Finished Fuzzed API C API
custom-page-sizes ❌ βœ… βœ… βœ… βœ… βœ…
threads βœ… βœ… 🚧[^8] ❌[^4] βœ… βœ…

[^8]: There are known issues with shared memories and the implementation/API in Wasmtime, for example they aren't well integrated with resource-limiting features in Store. Additionally shared memories aren't supported in the pooling allocator. [^4]: Fuzzing with threads is an open implementation question that is expected to get fleshed out as the shared-everything-threads proposal advances.

Tier 3 WebAssembly Proposals

Proposal Phase 4 Tests Finished Fuzzed API C API
branch-hinting [^12] βœ… βœ… βœ… ❌ βœ… βœ…
stack-switching [^11] ❌ 🚧 🚧 ❌ ❌ ❌
compact-import-section [^13] βœ… βœ… βœ… ❌ βœ… βœ…

[^12]: Disabled by default (Config::wasm_branch_hinting) pending fuzzing; tracked at #9463. [^11]: The stack-switching proposal is a work-in-progress being tracked at #9465. Currently the implementation is only for x86_64 Linux. [^13]: Disabled by default (Config::wasm_compact_imports) pending fuzzing; tracked at #14108.

Unimplemented proposals

Proposal Tracking Issue
flexible-vectors #9464
memory-control #9467
shared-everything-threads #9466

Component-Model Proposals

Changes to the component model aren't currently of the same shape as changes to core WebAssembly itself. There are not proposal repositories at this time but instead the main specification has "emoji gates" where parts of the specification are considered gated when the descriptive text or binary form is annotated with a specific emoji. This is the status of the emojis and implementations within Wasmtime.

On-by-default proposals

Proposal Emoji Phase 4 Tests Finished Fuzzed API C API
async πŸ”€ βœ… βœ… βœ… βœ… βœ… 🚧[^c1]

Off-by-default proposals

Proposal Emoji Phase 4 Tests Finished Fuzzed API C API
map πŸ—ΊοΈ βœ… βœ… βœ… βœ… βœ… βœ…
implements 🏷️ βœ… βœ… βœ… ❌ βœ… βœ…
more async options [^c2] 🚝 ❌ βœ… ❌ ❌ βœ… βœ…
stackful async [^c2] 🚟 ❌ βœ… ❌ ❌ βœ… βœ…
threading 🧡 ❌ βœ… ❌ ❌ βœ… ❌
fixed-length-lists πŸ”§ ❌ βœ… 🚧 ❌ βœ… ❌
memory64 🐘 ❌ 🚧 🚧 ❌ 🚧 ❌
error-context [^c2] πŸ“ ❌ ❌ ❌ ❌ 🚧 ❌
values πŸͺ™ ❌ ❌ ❌ ❌ ❌ ❌
nested names πŸͺΊ ❌ ❌ ❌ ❌ ❌ ❌
canonical names πŸ”— ❌ ❌ ❌ ❌ ❌ ❌
shared-everything-threads πŸ§΅β‘‘ ❌ ❌ ❌ ❌ ❌ ❌

[^c1]: Tracked in #13705 [^c2]: These features were sliced out of the original async proposal for the component model but the implementation remains in Wasmtime.

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. For component model proposals this means that the WASI subgroup has voted to include this feature in a release of WASI

  • 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 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 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. The module_generation_uses_expected_proposals test in the wasmtime-fuzzing crate must be updated to include this proposal.

    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.

    One indication of the status of fuzzing is this file which controls module configuration during fuzzing.

  • 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.

  • Enabled - Whether or not this feature is on-by-default. Off-by-default features require an opt-in on the CLI or via the embedding API to use, but on-by-default features require no explicit action to use the feature.