compilers-course-materials/incremental-jit — explained in plain English
Analysis updated 2026-05-18
Study how a JIT compiler is built incrementally, section by section, from numbers up through function calls and optimizations.
Run the differential test suite to see how ahead of time and just in time compiler backends are checked against each other automatically.
Compare an AI generated reproduction of the compiler against the original to study how well it followed the paper's specification.
| compilers-course-materials/incremental-jit | abc3dz/mixxx | abyo-software/ferro-stash | |
|---|---|---|---|
| Stars | 1 | 1 | 1 |
| Language | Rust | Rust | Rust |
| Setup difficulty | hard | moderate | moderate |
| Complexity | 5/5 | 2/5 | 4/5 |
| Audience | researcher | general | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Requires a Rust toolchain targeting a specific platform plus the nasm assembler and make, and mainly targets x86_64-apple-darwin.
This repository is a teaching artifact that goes with an academic paper about building a just in time, or JIT, compiler step by step. It contains a working compiler, written in Rust, for a small made up programming language called snek, and it is adapted from a real university compilers course at UC San Diego. The point of the project is to show how you can build a compiler incrementally, adding one feature at a time, such as numbers, variables, conditionals, and functions, while keeping two different ways of running the code in agreement with each other the whole way through. The repo is organized into three parts. The first is a series of numbered folders, each one a separate small Rust project representing the compiler exactly as it existed at the end of one section of the paper, starting with basic numbers and ending with JIT specific optimizations. Each of these folders can compile a snek program in two ways: ahead of time into raw assembly code that gets linked and run as a normal program, or just in time, meaning the program is assembled and executed immediately in memory using a technique the code implements with a Rust library called dynasm. The core idea checked throughout is that both approaches must always produce the same result. The second part is a differential test suite, kept in a separate folder called fuzz, which automatically generates many small snek programs, runs each one through both the ahead of time and the just in time backends, and checks that they agree, catching thousands of test cases per run for the more advanced sections. The third part is an independent reproduction attempt, where the AI model Claude Opus was given only the paper's text and asked to rebuild the same compiler from scratch, without seeing the original curated code, so its results could be compared against the official implementation as an experiment in whether an AI can reproduce published research from a paper alone. Running the project requires a Rust toolchain along with the nasm assembler and the make build tool, and it targets a specific processor and operating system combination, though the underlying compiler is not tied to any one platform. The README notes the AI generated reproduction's REPL is not crash safe like the original, since certain invalid inputs make it crash rather than reporting a clean error.
A teaching artifact and paper companion showing how to build a JIT compiler for a small language step by step, with a matching AI reproduction to compare against.
Mainly Rust. The stack also includes Rust, dynasm, nasm.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Don't trust strangers blindly. Verify against the repo.