
What happened
Jarred Sumner, creator of the Bun JavaScript runtime, used Claude (Anthropic's AI agent tool) to port approximately 535,000 lines of code from Zig to Rust over 11 days. The rewritten Bun 1.4 (Canary) now runs on Rust instead of Zig and passed the full test suite.
Why it matters
The migration eliminates memory leaks, reduces binary size by approximately 20%, and improves performance by 2–5%. Sumner chose Rust for its memory safety guarantees—preventing crashes from memory errors that were harder to catch in Zig—making Bun more stable for users relying on it (including Anthropic, which acquired Bun in December 2025).
What to watch
The work cost approximately $165,000 in Claude API usage and involved dynamic workflows running continuously for 11 days, generating 6,778 commits and peaking at approximately 1,300 lines of Rust code per minute. Sumner used multi-agent adversarial code review and test-driven iteration rather than manual verification, establishing a pattern for large-scale AI-assisted refactoring.
Summaries like this, every morning.
By signing up you agree to the Terms of Service and Privacy Policy.
Bun, a Node.js-compatible JavaScript runtime, was acquired by Anthropic in December 2025 and serves as the runtime for Claude Code. In May 2026, Sumner began experimenting with migrating the codebase from Zig to Rust; by July 2026, he had completed the full rewrite using Claude as an AI agent orchestrator.
The approach was methodical: Sumner first established porting rules and lifetime annotations by discussing patterns with Claude and creating reference documents. He then deployed dynamic, multi-agent workflows that ran for 11 continuous days, generating code, running tests, and receiving corrections in tight feedback loops. Critically, Sumner used adversarial review agents (at least two per implementation agent) to catch bugs and enforce correctness, treating the test suite and automated review as the source of truth rather than manual code inspection. At peak, the system generated approximately 1,300 lines of Rust per minute across parallel agents, producing 6,778 commits.
The results—elimination of memory leaks, 20% smaller binary, and 2–5% performance gain—suggest that large-scale refactoring can be completed via AI-assisted workflow iteration without traditional line-by-line human review, provided test coverage and adversarial automation are sufficiently robust. For businesses considering large code migrations, this demonstrates a potential cost-benefit: $165,000 in API usage versus the equivalent of three engineers for one year.
Pick your industry and the AI tools you use, and get news related to your work every day.
By signing up you agree to the Terms of Service and Privacy Policy.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.
AWS CEO Matt Garman detailed AWS Greenlight ahead of re:Invent 2026, an automated reasoning service that mathe…
Amazon introduced Ergo at re:Invent, priced at $1 per million input tokens and $3 per million output tokens, a…

David Fincher confirmed using AI in postproduction on The Further Mis-Adventures of Cliff Booth to alter wigs…

Amazon released Ergo, an open-weight AI model it says is the most capable open-weight model on day one, and sa…

Meta revealed the Muse Charm costs $299 and can be ordered now by asking your Muse AI agent; it launches in Me…

Gray Swan's new Frontier Hazard Tracker found OpenAI and Anthropic models took the top seven spots on reward h…
