Learnings from 100K lines of Rust with AI (2025)
The article discusses the development of a Rust-based multi-Paxos consensus engine that modernizes Azure's Replicated State Library. The project, which involved writing 100K lines of Rust code, achieved significant performance improvements and highlighted the benefits of AI-assisted coding. Key techniques included using code contracts and aggressive performance optimization to enhance system reliability and efficiency.
- ▪The project took approximately three months to complete, with 100K lines of Rust code written in about four weeks.
- ▪Performance optimization increased operations per second from 23K to 300K within three weeks.
- ▪AI coding agents like Claude Code and Codex were instrumental in driving productivity and implementing features.
Opening excerpt (first ~120 words) tap to expand
Learnings from 100K Lines of Rust with AI Dec 1, 2025 pre code { white-space: pre-wrap; word-break: break-word; } In the past few months, I’ve been stress-testing how far AI coding agents can take us when building real, production-grade distributed systems. The result: a Rust-based multi-Paxos consensus engine that not only implements all the features of Azure’s Replicated State Library (RSL) [1] — which underpins most major Azure services — but also modernizes it for today’s hardware. The entire project took me ~3 months, with 100K lines of Rust code written in ~4 weeks and performance optimization from 23K operations/sec to 300K ops/sec achieved in ~3 weeks. Besides unprecedented productivity, I discovered several techniques that were instrumental.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Cheng Huang’s corner.