Rusty Runtimes: Building Languages In Rust
summary
A compiler for a small garbage collected Scheme‑like language called K Lambda is implemented entirely in Rust and outputs Rust code; parsing uses nom macros, runtime values are reference‑counted, currying forces many cloned captures, and tail calls are handled with a generated trampoline loop. Benchmarks show the implementation is slow but tiny in memory — a cons list run takes about seven minutes while others finish in seconds and holds near 5.5 MB. It works but is naive and needs more static analysis and fewer clones.
AI-written summary · about
chapters (10)
- 0:00Overview
- 1:41Rust
- 6:44Parsing a string
- 8:50Parsing Symbols
- 9:33Writing A Macro
- 13:04Example
- 17:37Code Generation
- 21:44Tail Calls
- 26:28Benchmarks
- 28:59Lessons learned
related talks
21mWhat I Learned About Rust by Creating a Language
15mBuilding Little Languages with Rust
49mYour Lambdas, In Rust!
30mRust: an alternative to high-level programming languages?
22mStak Scheme: The tiny R7RS-small implementation
56mReady for Rust
40mRust’s approach of getting things right
01h 14mRust: A Friendly Introduction
