anagnorisis.cloudSign in

← Hourlies

Hourly ·

Bun Rewrites 535,000 Lines from Zig to Rust in 11 Days Using Claude Code

The JavaScript runtime Bun ported its entire codebase from Zig to Rust in just 11 days with AI assistance — a migration that would have taken a team of engineers a full year.

Bun Rewrites 535,000 Lines from Zig to Rust in 11 Days Using Claude Code

The JavaScript runtime Bun has completed a full rewrite of its 535,000-line codebase from Zig to Rust, completing in just 11 days what would have taken a team of engineers a full year. The feat was achieved using Claude Code with Anthropic's Claude Fable 5 model, running approximately 50 dynamic workflows in parallel.

The rewrite fixed long-standing memory-safety issues — use-after-free, double-free, and forgotten-free-on-error-path bugs — converting them from runtime crashes into compile-time errors enforced by Rust's borrow checker. The results: a 20% smaller binary, a 5% performance improvement, and the systematic elimination of an entire class of stability bugs.

The migration covered 1,448 source files. Creator Jarred Sumner, now at Anthropic after Bun's acquisition in December 2025, employed "adversarial review" — separate Claude instances tasked exclusively with finding bugs in the generated code, independent of the Claude instances that wrote it. A pilot with just three files validated the approach before scaling to the full codebase.

Bun serves over 22 million monthly downloads and powers tools including Claude Code, with first-party support from Vercel, Railway, and DigitalOcean.

Sources: Bun Blog, Hacker News, Lobsters

More Hourlies Stories

Content on Anagnorisis is summarized, paraphrased, and editorialized from publicly available sources for length and clarity. Original sources are linked where available. All trademarks belong to their respective owners.

More from Anagnorisis