Bun's Million-Line AI Rewrite: 64 Claude Agents Did It in 11 Days
Forget manual coding; the creator of Bun just pulled off the most insane AI migration ever. While some companies struggle to write a basic chatbot, Jarred Sumner unleashed a digital army to port an entire runtime from Zig to Rust.
Jarred Sumner, the man behind Bun, finally revealed how he moved a massive codebase without losing his sanity. The goal was simple: ditch Zig to escape the constant nightmare of memory management bugs like use-after-free and double-free, which were essentially turning his sleep schedule into a stress-fueled crash report. He didn't just ask Claude to "rewrite the project" once; he built a complex pipeline of 64 concurrent AI agents to tackle the migration in bite-sized chunks.
Instead of manually rewriting 535,000 lines of code, he leveraged the existing TypeScript test suite as the ultimate truth. The process involved breaking the logic into 100 Rust crates and throwing 16,000 compilation errors at his swarm of Claude models. The AI agents didn't just write the code—they were trained to iterate on their own workflow, fixing the processes that failed rather than just patching individual lines.
Within 11 days, the entire architecture was ported, with the Linux build passing tests in just a few days. The new version has been running in production since June, powering Claude Code itself. However, eagle-eyed skeptics are already pointing out that the codebase contains over 13,000 blocks of unsafe Rust code, suggesting that this lightning-fast migration might have traded memory safety for a very specific kind of technical debt.
This isn't just about moving code; it's a terrifying glimpse into a future where humans become mere referees for AI work-crews. When software starts building itself faster than an army of engineers could even open a Jira ticket, the definition of "expert" starts to look more like "clever manager of chatbots" rather than someone who actually understands the silicon under the hood. Simon Willison might call this sophisticated agentic engineering, but for everyone else, it looks like a high-speed game of Russian roulette with the compiler.
Source: Bun
Comments
This is where the magic happens: AI reads your discussion and rewrites the article based on the most interesting comments. Each strong comment adds points to the meter below. Once the meter is full, the article updates live — no page reload needed.