Bun, the JavaScript runtime and Node.js-compatible toolkit, has completed a Zig-to-Rust migration generated largely through Anthropic’s Claude Code workflows. According to Anthropic’s July 16 account, the port produced roughly one million lines of Rust in less than two weeks, passed Bun’s existing CI test suite before merge, and had already shipped inside Claude Code in June.
Bun co-founder Jarred Sumner reportedly ran about 50 parallel AI workflows for the rewrite. Anthropic puts the model consumption at 5.9 billion uncached input tokens and 690 million output tokens—about $165,000 at API pricing. That is not “free code,” but it is far below the cost and calendar time normally associated with maintaining two implementations during a language migration.
The notable result is not that a chatbot emitted Rust files. The work used a constrained, repeatable process: old Zig code acted as a behavioral reference, agents were given migration rules, builds and tests repeatedly fed failures back into the workflow, and the team adjusted the generation process rather than hand-patching every output problem.
Anthropic says the Rust code passed 100% of Bun’s existing tests in continuous integration before merge. That corrects some early coverage that reported a 99.8% result. It also says 19 regressions surfaced after the merge and were subsequently fixed.
That distinction matters. A successful test suite establishes compatibility with the behavior the suite covers; it does not establish that every memory-lifetime assumption, uncommon platform path, performance edge case, or future maintenance task has been made safer simply because the implementation now uses Rust.
The concern is not merely language tribalism. Rust’s safety advantages depend on design and review, especially where code uses
For Windows developers, Bun remains relevant as a fast runtime, package manager, bundler, and test runner for JavaScript and TypeScript projects. But this migration is primarily an engineering-process story, not a reason to change deployment policy overnight. Teams using Bun should treat the Rust build as a major implementation transition: pin versions where reproducibility matters, keep CI coverage broad across Windows environments, and test upgrades against their own workloads rather than relying on headline benchmark or test-pass figures.
Bun’s Rust port is now in production use, and its maintainability will be measured by the bugs, fixes, and contributions that follow.
Bun co-founder Jarred Sumner reportedly ran about 50 parallel AI workflows for the rewrite. Anthropic puts the model consumption at 5.9 billion uncached input tokens and 690 million output tokens—about $165,000 at API pricing. That is not “free code,” but it is far below the cost and calendar time normally associated with maintaining two implementations during a language migration.
Fast migration, not automatic proof
The notable result is not that a chatbot emitted Rust files. The work used a constrained, repeatable process: old Zig code acted as a behavioral reference, agents were given migration rules, builds and tests repeatedly fed failures back into the workflow, and the team adjusted the generation process rather than hand-patching every output problem.Anthropic says the Rust code passed 100% of Bun’s existing tests in continuous integration before merge. That corrects some early coverage that reported a 99.8% result. It also says 19 regressions surfaced after the merge and were subsequently fixed.
That distinction matters. A successful test suite establishes compatibility with the behavior the suite covers; it does not establish that every memory-lifetime assumption, uncommon platform path, performance edge case, or future maintenance task has been made safer simply because the implementation now uses Rust.
The Rust argument is not settled by the rewrite
Andrew Kelley, creator of Zig, has criticized both Bun’s previous engineering practices and the confidence being placed in a million-line AI-generated port. As reported by The Register, Kelley’s core objection is that the same tests that missed problems in the old implementation cannot be assumed to validate all defects introduced by a wholesale new one.The concern is not merely language tribalism. Rust’s safety advantages depend on design and review, especially where code uses
unsafe interfaces or directly translates manual-memory-management patterns from another language. Bun’s GitHub tracker has already recorded and closed issues involving undefined behavior in the Rust port, which is exactly the sort of post-merge finding a green compatibility suite may not expose.For Windows developers, Bun remains relevant as a fast runtime, package manager, bundler, and test runner for JavaScript and TypeScript projects. But this migration is primarily an engineering-process story, not a reason to change deployment policy overnight. Teams using Bun should treat the Rust build as a major implementation transition: pin versions where reproducibility matters, keep CI coverage broad across Windows environments, and test upgrades against their own workloads rather than relying on headline benchmark or test-pass figures.
Bun’s Rust port is now in production use, and its maintainability will be measured by the bugs, fixes, and contributions that follow.
References
- Primary source: International Business Times, Singapore Edition
Published: 2026-07-20T15:14:55+00:00
Claude Code Rewrote Bun From Zig to Rust in 11 Days, Proving t...
Anthropic's Claude Code helped rewrite Bun from Zig to Rust in 11 days, but developers say long-term maintainability will determine the project's success.www.ibtimes.sg - Official source: claude.com
How Anthropic runs large-scale code migrations with Claude Code | Claude by Anthropic
A step-by-step guide to running large code migrations with AI agents — including Bun's million-line Zig-to-Rust port.claude.com - Related coverage: theregister.com
Zig creator calls Bun’s Claude Rust rewrite ‘unreviewed slop’
The port took just 11 days and about $165,000 at API pricingwww.theregister.com - Related coverage: thekb.eu
Bun's Zig-to-Rust Rewrite With Claude Code in 11 Days — thekb.eu
First-rate technical account by **Jarred Sumner**, creator of **Bun** (JS/TS runtime, >22M downloads/month), on the **complete rewrite of Bun from Zig to Rust…www.thekb.eu
- Related coverage: stack-archive.com
How 64 Claude Agents Rewrote Bun From Zig to Rust in 11 Days
64 parallel Claude Fable 5 instances rewrote Bun's 1M+ line codebase in 11 days for $165K — compressing a year of engineering work. What this means for AI-assisted migration.stack-archive.com
- Related coverage: qore.com
El creador de Bun reescribe su runtime de Zig a Rust en 11 días usando 64 agentes de Claude
Cómo Jarred Sumner reescribió Bun de Zig a Rust en solo 11 días usando agentes de Claude Fable 5.www.qore.com