Stak Scheme: The tiny R7RS-small implementation
summary
Stak Scheme implements a full R7RS-small system with a claimed 10 KLOC core: a bytecode compiler in 1.6 KLOC of Scheme and a 1.5 KLOC Rust VM. It supports library system, hygienic syntax-rules macros, continuations, exceptions and a full eval, and uses a unified in-memory graph ↔ serialized bytecode encoding/decoding to preserve shared nodes and compiler state. Binary is larger than some prior tiny implementations but remains compact, and benchmarks show performance comparable to other Scheme runtimes for embedded scripting use cases.
AI-written summary · about
chapters (9)
- 0:00Stak Scheme intro
- 1:31Ruby Scheme and R7RS-small
- 3:43VM design and code
- 7:25Code graph and snapshots
- 11:52Procedures and compilation
- 14:07Macros and libraries
- 15:58Compactness vs performance
- 19:33Future work and security
- 21:22Summary
related talks
36mRusty Runtimes: Building Languages In Rust
31mReally Small Rust
18mLearning Systems Programming with Rust
27mMiniRust: A Core Language for Specifying Rust
15mBuilding Little Languages with Rust
52mImplementing a Simple JVM in Rust
34mMiniRust: A core language for specifying Rust
49mThe Eternal Sunshine of the Spotless Programming Language
