
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, in your inbox every morning.
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.
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.
Google Deepmind's Gemini 4 Argon scored 97.5 percent on ARC-AGI-3 at a cost of $4,800, second only to GPT-6 As…

Cammarata reinterprets InceptionV1's cat-car neuron as a V-shape detector, not two unrelated concepts

Microsoft's Surface Laptop Ultra, using Nvidia's RTX Spark platform, starts at $2,599 (up to $5,899)

Meta's new commercial terms, effective October 30th, appear to let it crawl and train AI on content from websi…

Vercel data published Thursday shows TypeSafe AI's Jev, a lightweight decision model for choosing among predet…

Reflection AI introduced Beam, an open-weight model for agentic coding and long-horizon tasks, with 501 billio…
