Goeteia: Self-Hosting Scheme Compiler to WebAssembly GC with Native Tail Calls and call/cc
Tags Developer Tools · OSS · Infrastructure
Goeteia is a Scheme implementation that compiles itself to WebAssembly GC (70 KB gzipped), achieving byte-identical self-hosted builds verified in CI. It targets Wasm GC structs for pairs/records, unboxed i31ref fixnums, and uses Wasm exception handling for O(1) call/cc. The runtime supports hygienic macros (syntax-rules/syntax-case), a full numeric tower (fixnum→bignum→flonum→rational→complex), real tail calls (100M iterations in constant stack), and a reactive web stack with fine-grained signals and JS FFI — all running in browsers and Node 22+ without a shadow JS heap.
Technical significance
This demonstrates Wasm GC and tail calls are mature enough for a full Scheme with continuations and a numeric tower — no JS heap proxy needed. The self-hosting fixpoint (byte-identical compiler output) is a strong correctness signal. For developers, it means Scheme (and by extension, languages with similar semantics) can run natively in browsers with real tail calls and call/cc, enabling new classes of portable language tools and REPL-driven development in the browser.