Learning Rust? I co-run a 6-week Python to Rust cohort where you build a performant JSON parser with PyO3 bindings.
Josh Engroff has been writing Python for years and runs agentic AI workflows every day. He bought the Rust book a year and a half ago, did some online exercises, stalled.
Six weeks into the cohort, his hand-rolled JSON parser beat CPython's stdlib json
module on every fixture in his benchmark suite, including three real-world files from the simdjson and serde-json corpora. Here is how he did it.
The expert mindset got in the way #
Josh did not come in cold. He'd tried C years ago after a senior dev told him to. He'd picked up Go for a stretch and dropped it. He'd done online Rust exercises and stalled. He knows Python well enough to get paid well for it and ships agentic workflows for a living.
That also posed a problem:
"I kind of thought I was going with beginner mindset into the Rust course. And then week two and a half I was like, oh no, I'm not. I have such expectations of the language and of myself. I've got to calm down."
By week 3 a voice in the back of his head started nagging: are you sure?
Josh could pass the tests, he could see the patterns. But ownership (Rust's rule that every value has exactly one owner that dictates when memory is freed), and the borrow checker are different enough from anything in Python that "I get this" and "I actually get this" are two different things.
So he went deeper. UTF-8 versus ASCII. How many bytes a character takes. Memory layout. The kind of detail Python lets you ignore but Rust forces you to confront.
The PR rhythm did the heavy lifting #
Every week, students push code. Jim Hodapp, our lead Rust coach, calls out what works, what to improve, and makes sure students own what they shipped.
In week 3, Jim left a comment on a chain Josh had written and called it an "idiomatic combinator style approach that goes beyond what the lesson demonstrates." That one line shifted how Josh approached the rest of the cohort:
"I felt like that gave me permission to be creative."
Permission to go off the curriculum is exactly when most students start learning the most.
The streaming parser: where the real speed came from #
Weeks 5 and 6 cover PyO3 and benchmarking. PyO3 is the library that lets you call a Rust module directly from Python. It's the same FFI layer behind Pydantic and Polars.
Josh shipped his week-5 parser, ran the benchmarks, and watched it lose to Python's stdlib json
.
"I was surprised. I was like, what? Why didn't it? I was assuming it would beat it. We're doing it in Rust. It's like magic."
Then he realized that the cohort's goal is a working, idiomatic parser, not a faster-than-C one. He could have stopped there, but he didn't.
He rewrote the parser as a single-pass streaming design that dispatches on the raw next byte. He learned lifetime parameters, copy-on-write, zero-copy string handling, fast-path number parsing. He read about SIMD, branch prediction, and memory access patterns. None of that was in the official curriculum.
The result is on the Scripter to Rust landing page: a parser that beats CPython's stdlib json
on every real-world fixture, up to 2.96× faster on canada.json. That stdlib module is written in C. The code and benchmark methodology are in his GitHub repo, including a detailed wiki walking you through every performance optimization.
"I figured if I didn't do that, no one would believe me. Also, you don't know something until you write about it. The writing forced me to really understand things at a different level."
The full conversation about the cohort, the parser, and Josh's performance work - part 1:
Rust changed how Josh writes Python #
The clearest sign the learning transferred: Josh is now 'annoyed' with some of his own Python (related: Learning Rust Made Me a Better Python Developer).
He runs a lot of LangGraph workflows. Functions chained together, state flowing through, agents doing real work. The kind of code where a malformed dict
can pass through three nodes before anything breaks.
"There needs to be bounded contracts in these things. We need to truly observe what's happening, because there are many side effects that are really hard to detect in complex LLM workflows."
He's now strict about types, frozen dataclasses, and Pydantic models for state. He built and published a small PyPI package called Stroma to catch the leaky parts of his workflows. He dropped 170 lines of Rust into a production Python app for fast string matching and wrote about it.
"It's a meaningful multiplier for your career. People notice."
Why Rust stuck for Josh after C and Go didn't, and how it's changed his Python - part 2 of our interview with Josh:
What changed #
Going in: a strong Python developer who had bounced off Rust twice. Coming out: a 6-week PR history, a parser that beats CPython's C-backed stdlib, a wiki, an idiomatic codebase, the muscle to bring Rust thinking back to his daily Python work, and the confidence to start a new Rust project from scratch (he puts it at 8 out of 10).
"Especially now when so much code is being generated by agents, taking the time to learn a different language is really important. It's not just rewarding. It's needed."
Want Rust to click beyond syntax? Build a JSON parser from scratch, wire it into Python with PyO3, and benchmark it against CPython and other JSON libraries. Six weeks of practical Python to Rust engineering with weekly PR reviews and support by experienced Rust and Python engineers, not lectures. Join the next Python to Rust cohort →