[Keynote] Wasm GC and the Future of High-Level Language Compilation
summary
Grain is ported to Wasm GC using anyref everywhere and replacing call_indirect with call_ref, requiring runtime ref casts but allowing the optimizer to remove many. An empty program shrinks from 3k→300B and a hello world shows 34% size reduction. Performance: list allocation is slightly slower on Wasmtime, much faster on a Wasm interpreter, and blazingly fast on V8. Practical issues include non‑nullable local scoping, immutable recursive types that can’t be instantiated, and inefficient byte-array access; component-model interop currently needs copies.
AI-written summary · about
chapters (10)
- 0:00Wasm GC introduction
- 1:26Why Wasm GC matters
- 3:10Simpler memory management
- 5:38New reference types
- 7:23Wasm GC quirks
- 10:13Grain’s Wasm GC case
- 13:44Compilation challenges
- 15:49Binary size impact
- 17:54Ecosystem benefits
- 19:00Q&A on subtyping
related talks
30mA Compiler Author’s Guide to WebAssembly GC
57mWasm GC
57mIs Wasm Becoming Garbage? (Keynote)
31mThe Future of Write Once, Run Anywhere: From Java to WebAssembly
31mIntroducing Kotlin/Wasm
32mThe State Of Kotlin/Wasm
44mWebAssembly and the Future of the JVM Ecosystem
37mBridging the Architecture Divide: How Hardware Limits Wasm, and How We Can Do Better
