The WasmFX project aims to enhance WebAssembly (Wasm) by introducing effect handlers as a means of efficiently compiling control idioms like async/await, generators/iterators, and first-class continuations. This extension allows for the implementation of non-local control flow abstractions without the need for whole-program transformations. WasmFX is designed to maintain backwards-compatible performance for existing programs while providing a modular and composable framework for implementing control flow abstractions. The design draws on well-established theoretical foundations and incorporates practical insights from decades of research on delimited control. Additionally, WasmFX is compatible with debugging and profiling tools, and it functions as a minimal and compatible extension to WebAssembly by utilizing its existing instruction set and type system.
https://wasmfx.dev/