Title: Wasm/k: Delimited Continuations for WebAssembly
Speaker: Donald Pinckney—University of Massachusetts, Amherst
Summary: WebAssembly is designed to be an alternative to JavaScript that is a safe, portable, and efficient compilation target for a variety of languages. The performance of high-level languages depends not only on the underlying performance of WebAssembly, but also on the quality of the generated WebAssembly code. Current compilers are forced to produce poor WebAssembly code in order to implement certain high-level language features such as green threads because WebAssembly disallows stack manipulation. We address this shortcoming by introducing Wasm/k, a small extension to WebAssembly that adds support for delimited continuations while retaining the speed and safety of WebAssembly. We have implemented Wasm/k in the Wasmtime runtime, and we provide case studies of how to implement various high-level language features (including green threads) using Wasm/k.