#10248·wasmtime

Tracking issue: Stack switching proposal implementation status

Author: frank-emrichCreated Feb 19, 2025Updated Sep 16, 2026
Labelswasm-proposal:stack-switching

This is a tracking issue for the in-progress implementation of the Wasm stack switching proposal. The explainer document for the proposal is here.

Progress of initial implementation

This just tracks what's happening in the sequence of PRs that's providing an initial implementation of the proposal. To get an idea of the extent of the initial implementation, see draft PR #10177.

  • Support for tags (implemented in #10251)
  • Type definitions for stack switching support (implemented in #10255)
  • Runtime support for stack switching (implemented in #10388)
  • Compiling stack switching instructions to CLIF

Limitations of initial implementation

These are things that won't be part of the initial implementation:

  • Support for ISAs other than x64
  • Support for resume.throw instructions (requires exception handling)
  • Support for deallocating continuations
  • Integration with GC (i.e., allowing continuation references to appear in GC objects, such as arrays an structs)
  • Windows support
  • Pulley support
  • Winch support

Miscellaneous TODO items

Larger outstanding work items which have arisen during review of the initial changes:

  • Hostcalls can currently be made directly from continuation stacks; this behavior is different than the fibers impl and we likely should not allow this, see related discussion
  • Currently stack switching and fibers use different stack layouts and cannot (without modification) share a lot of functionality (e.g. pooling allocator used for fiber stacks); long-term, we would like to unify these two mechanisms where possible. See discussion. (Note: This will likely mean that stack switching will require cfg(feature = "async") which is what we probably want anyways)
  • Implement full GC of continuations

Source: bytecodealliance/wasmtime