Virgil as a Systems Programming Language
summary
Virgil is a self-hosted systems language that compiles to ELF/Mach-O/JAR/WASM directly, implements its own assembler and runtime, and uses stack maps to enable a precise GC; the compiler is ~46K LOC, the simple runtime ~3K LOC, and the compiler compiles itself in ~0.3s. Unsafe work is confined to a pointer unsafe type on native targets for kernel calls and stack walking. The Wizard WebAssembly engine is written entirely in Virgil (no C), proves extensible guest object shapes, and shows a naive ADT-based interpreter is ~100× slower than the hand‑written assembly baseline.
AI-written summary · about
chapters (14)
- 0:00Virgil introduction
- 4:34Virgil language history
- 7:06Native systems requirement
- 8:52Memory safety in Virgil
- 15:54Algebraic data types in Virgil
- 19:25Self-hosting runtime
- 26:07Kernel interaction
- 29:56Garbage collection
- 33:08High-performance systems
- 37:17WebAssembly interpreter
- 45:18Dynamic code generation
- 51:00Extending garbage collection
- 54:54Systems language requirements
- 56:47Q&A
related talks
29mA Fast In-Place Interpreter for WebAssembly
48mOne VM To Rule Them All
35mWebAssembly: now web is a new compiler target architecture
27mUnboxing Virgil ADTs For Fun and Profit
17mV, as in Vautledétour
50mOne VM to Rule Them All
17mImplementing and Evaluating a High-Level Language with WasmGC and the Wasm (…)
43mLivecoding a WebAssembly interpreter
