An AI rewrite of a popular Anthropic-owned JavaScript runtime and toolchain has sparked praise for the speed of its execution, but also criticism of the coding practices behind the project itself.
Last week, Bun creator Jarred Sumner announced that he ported Bun from the Zig programming language to Rust in only 11 days, using a fleet of Claude agents running in parallel. The work cost an estimated $165,000 at API pricing, suggesting that software revisions previously considered too large to undertake could actually be feasible now with AI.
Sumner said the port was necessary given the growing number of bugs Bun users were finding, including one implicated in the recent Claude Code source leak.
But the creator of Zig, Andrew Kelley, didn’t want his project to be seen as the culprit behind Bun’s woes, which he blames on Sumner’s bad programming practices.
For Kelley, the move to Rust was not about the feature differences between the two languages, or even the use of AI, but rather “the diverging value systems of the two projects,” he wrote.
Bun background
Bun is a JavaScript suite consisting of a runtime, package manager, bundler and test runner. To make Bun speedy, Sumner used Apple’s JavaScriptCore engine rather than Google’s V8, and Zig for performance and low-level control.
Anthropic acquired Bun in December 2025. By then Sumner had been using AI heavily; a Claude Bot called RoboBun supplied the most merged PRs fixing bugs and remediating test failures.
As Bun’s user base grew, more cracks appeared. Anthropic’s 512,000-line code leak in March was linked to a Bun bundler bug that generated source maps during builds even when told not to.
All these bugs weren’t Zig’s fault, Sumner explained in a blog post last week. Bun’s architecture mixed garbage collection and application-driven memory management. Sumner admitted that Zig wasn’t designed for that task; Rust was better at automating memory management.
The Rustification of Bun
Rewriting ~500,000 lines of Zig by hand would take a small team about a year and freeze other work, Sumner wrote. Instead he spun up about 50 dynamic Claude Code workflows, peaking at about 1,300 lines of code per minute and generating over a million lines of Rust. The job took 11 days and cost about $165,000 at API pricing; Claude Fable did most of the heavy lifting.
The Rust-based Bun then passed Bun’s test suite of more than one million assertions across all supported platforms without skipping or deleting any, according to Sumner.
HashiCorp co-founder Mitchell Hashimoto noted admiration for the speed of the achievement.
Zig creator response
Zig’s Andrew Kelley shared misgivings in a post titled “My Thoughts on the Bun Rust Rewrite.” Even before the Anthropic acquisition, “we became increasingly horrified at the programming practices we saw in Bun’s codebase,” Kelley wrote. Bun was one of the largest Zig projects and a regular financial contributor to The Zig Software Foundation until the acquisition.
In Kelley’s view, aggressive feature shipping piled up bugs, bad error-handling, and technical debt. Sumner “was already writing slop well before he had access to LLMs,” Kelley quipped. He argued Bun parting with Zig was good news so Zig would no longer be publicly associated with “How Not To Write Zig Code.”
The Bun team also tried to upstream AI-assisted work to Zig (including a fork claimed to improve debug compilation speed fourfold), but Zig would not accept the changes under a policy of not accepting AI-based contributions, citing an influx of dubious LLM-generated submissions.
Kelley questioned whether an exhaustive test suite that missed bugs in Zig code could be relied upon for a million lines of unreviewed AI-generated Rust: “It’s not sufficient to catch bugs in Zig code but it is sufficient to catch bugs in [a] million lines of unreviewed slop?”