WASM Proposal Lacks Support for Reusable Continuations

The WebAssembly Stack Switching Proposal is introducing support for one-shot continuations, which can only be resumed once. This is great for features like coroutines or async/await, but it falls short for languages like Racket, where reusable (multi-shot) continuations are a core feature.

I’ve opened a GitHub issue suggesting optional support for reusable continuations. Possible approaches include using linked list stacks (as in traditional persistent data structures) or extending the proposal to better accommodate multi-shot behavior. Alternatively, generating CPS-transformed WebAssembly code could serve as a workaround, but it comes with its own trade-offs.

If anyone is working on compiling Racket to Wasm or has insights on this, I'd love to hear your thoughts!

Edit : This is the correct link
Optional Support for Multi-Shot Continuations · Issue #110 · WebAssembly/stack-switching

1 Like