Building an interpreter for a language you don't know, in a language you've possibly never used, based on a book written in a third language — that's the premise here. You'll work through Robert Nystrom's Crafting Interpreters and implement its Lox language in Rust, translating the book's Java code as you go.
Who this is built for
- Developers with some Rust experience who want a real, multi-part project beyond toy examples
- Confident compiler or interpreter developers who are curious about Rust but haven't used it yet
- Developers with neither Rust nor interpreter experience, but with an open stretch of time and an appetite for a demanding challenge
It plays out like a marathon — there's a good chance you'll question the decision partway through, and a good chance you'll be glad you finished.
What you'll build
Working through the first ten chapters of the book, you'll construct an AST-walking interpreter covering scanning and lexical analysis, recursive descent parsing, AST construction and execution, variables and scope, control flow, and functions with closures.
Rust concepts along the way
Expect to pick up module organization, string handling, Option/Result-based error handling, testing, algebraic data types, recursive structures, pattern matching, ownership and borrowing, and interior mutability — applied to something concrete rather than practiced as isolated exercises.
Format and prerequisites
This is a week-long, project-intensive format: each morning covers programming language design and Rust implementation, with most of the day set aside for independent coding. You should be comfortable with core programming concepts — expressions, operators, variables, control flow, functions, and classes. Prior interpreter experience helps but isn't required, and no Rust background is assumed, though expect a steep initial learning curve.