← all news

Bun was rewritten from Zig to Rust in 11 days with one engineer and Claude

AI · · · source (bun.com)

Jarred Sumner rewrote Bun, the JavaScript runtime, from Zig to Rust, and the striking part is how he did it. One engineer, using a pre-release Claude Fable 5 and Claude Code, took the project from a standing start to a fully passing test suite on every platform in 11 days. Sumner reckons a team with full context on the codebase would have needed about a year. The Rust port has shipped inside Claude Code since June 17.

He did not just tell Claude to rewrite everything at once. He spent about three hours mapping how Zig patterns should translate to Rust, and Claude wrote that discussion into a PORTING.md guide. To satisfy Rust's borrow checker, he ran a workflow that read every struct field across the codebase, traced its control flow, proposed a lifetime, then used two adversarial review agents to check each proposal before recording it in a LIFETIMES.tsv file. Only after testing the process on 3 files did he let Claude translate all 1,448 Zig files, each new file written by one agent and checked by two reviewers.

The bill was large but legible: about 5.9 billion input tokens and 690 million output tokens, roughly $165,000. Bun was acquired by Anthropic in December 2025, which is how Sumner had early access to Fable.

Why it matters

If you lead engineering, this is a concrete data point for what one well-supervised person plus agents can do on the kind of full-language rewrite most teams treat as too risky to attempt. The method is the transferable part: a large test suite acting as the specification, adversarial reviewers checking every translation, and fixing the process instead of patching output by hand.

AgentsEngineeringAnthropic