Learn Rust by Building a JSON Parser
AI writes Rust now. Can you tell when it's wrong?
ruff, uv, Pydantic v2, Polars, orjson: the fast layer under your Python is Rust, and it keeps growing. AI will happily generate that Rust for you on demand. The hard part is catching it when it's wrong: a needless clone, a swallowed Result, an ownership model the compiler waved through but you can't defend. You learn to spot that by having built the thing by hand.
This cohort is where you build it. You learn to think like a systems engineer: where scripting languages hit their limits, how memory and performance actually work, and why the infrastructure under your AI stack keeps getting written in Rust. You build a JSON parser from scratch, wire it into Python with PyO3, and benchmark it against CPython and other JSON parser libraries. Six weeks of real code review from engineers who've shipped Rust in production. Co-led with Rust engineer Jim Hodapp.
Performance is only the first reason to learn Rust now. Its strictness (explicit errors, no nulls, ownership over who mutates what) trains a precision that carries straight back into your Python. And its compiler is one of the best guardrails you can put on AI-generated code: it refuses to compile the bugs an agent will happily write.
Who is this for?
Developers comfortable with Python (or another scripting language) who want to understand the systems layer beneath the apps they build. Not a "hello world" workshop. You build a parser, bridge it to Python, and measure the performance difference.
Time commitment: 6-10 hours per week.
What you'll build
A complete, fast JSON parser in Rust, callable from Python.
Parser from scratch
Tokenizer, recursive descent parser, full JSON spec. Enums, pattern matching, ownership, borrowing, learned by building, not reading.
PyO3 Python integration
The same FFI layer behind Pydantic and Polars. You create Python bindings, handle cross-language memory, and import your Rust code in Python.
Benchmarked performance
Measure your parser against Python's json module. Profile bottlenecks, optimize hot paths, and understand why Rust is fast, not just that it is.
What you build, week by week
Setup & Tokenization
- Project setup with cargo
- Variables & mutability
- Basic types: String vs &str
- Build a JSON tokenizer
Types & Errors
- Enums & pattern matching
- Option<T> and Result<T, E>
- Error handling with the ? operator
- Parse primitive JSON types
Ownership & Borrowing
- Structs and impl blocks
- References: & and &mut
- Ownership vs borrowing
- Structured parser with state
Collections & Recursion
- Vec<T> and HashMap
- Iterators and loops
- Recursive data structures
- Parse arrays & objects
PyO3 & Python Bindings
- Foreign Function Interface (FFI)
- PyO3 crate and Python bindings
- Cross-language memory management
- Import and call Rust from Python
Optimize & Benchmark
- Performance profiling
- String allocation optimization
- Benchmark vs Python's json
- Production-ready library
Tech stack: Rust, cargo, clippy, rustfmt, PyO3, maturin
Real results
Engineers finish this cohort with a real parser on their GitHub, built from scratch and reviewed weekly via PRs. Josh, Jochen, and Vikas each shared what they got out of it, from the engineering to how it changed the way they read Python.
"I left able to read real Rust, spot AI hallucinations, and apply the mental model at work. Great value for busy engineers."
"Building something real made Rust click in a way that tutorials never could, and honestly, it's made me a better Python developer too."
Why do it with a coach, not just an AI
You could ask an assistant to explain lifetimes and get a correct answer in seconds. The reason developers still finish six weeks of real Rust isn't the answer, it's the person on the other side. Someone reviews every PR, expects your next one, and tells you not just what compiles but whether it was the right call. A developer from a recent cohort put it plainly: knowing a human is counting on you to show up motivates more than any wall of text an assistant hands back. That accountability, plus deep review from engineers who've shipped Rust in production, is what turns six weeks into a skill you keep.
Join the cohort
Six weeks, two coaches, a portfolio-ready project. Capped small for high-touch, detailed PR review on every push: ownership, lifetimes, and idiomatic Rust, not just whether it compiles.
Book a call to reserve your seat →
Full curriculum and enrollment: scriptertorust.com. Prefer 1:1 on your own Rust project? Start here →