Skip to content

Tracking issue: Stack switching proposal implementation status #10248

@frank-emrich

Description

@frank-emrich

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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions