After 10 years of writing C++ while at Google, I’ve really enjoyed writing Rust over the last 6 months at Anthropic. It’s truly a breath of fresh air - modern APIs, confidence that if my code compiles it will work as expected, easy dependency management, a great linter. I say that as someone deeply familiar with modern high-performance C++, having touched around 1 million lines of C++ in various RL and distributed systems projects. Sanitizers and absl threading annotations are great, but categorically preventing memory and concurrency bugs from compiling is even better.
One of the most important upsides was entirely unexpected: Rust is great for letting Claude Code work unsupervised on larger tasks. The combination of a powerful type system with strong safety checks acts like an expert code reviewer, automatically rejecting incorrect edits and preventing bugs. This matches my experience from AlphaProof, where we used the formal Lean theorem proving language to ensure the correctness of all proofs discovered by the search algorithm.
I’ve also found Claude very effective at dealing with the sharp edges of Rust - my favorite is to tell it “fix the lifetimes”, and have it figure out which combination of ref x
, x.as_ref()
, etc is necessary to make my code compile. Meanwhile I can focus on the fun parts and build out new features!
This has made me even more optimistic about the future of Rust than I already was. If you've previously tried Rust but found the learning curve too steep, give it another try while pairing with Claude Code or your favourite assistant!
Tags: programming, ai, rust, claude