Bun’s rewrite from Zig to Rust has turned into a flashpoint well beyond one programming language choice.

In May, Bun founder Jarred Sumner said the team rewrote about 1 million lines of Bun code in 11 days using Anthropic’s then-unreleased Claude Fable 5, described in the report as a Mythos-tier model, along with Claude Code’s dynamic workflow features. Anthropic later promoted the effort as a showcase case for Dynamic Workflows.
Bun moved away from Zig after stability issues
Bun is a high-performance JavaScript and TypeScript runtime built as a faster, more modern direct alternative to Node.js. Part of its appeal had long been tied to its use of Zig, which helped support its reputation for speed across startup time, package installation, and test execution.
In December last year, Anthropic said it had acquired Bun and would use it as infrastructure for Claude Code and the Claude Agent SDK. Sumner and other Bun team members are now working at Anthropic.

After broader deployment, especially as infrastructure underneath Claude Code, the Bun team concluded that the Zig version had stability problems that were hard to eliminate. The issues cited in the report include use-after-free, double-free, and memory that was not released on error paths. In Zig, those risks were described as being governed largely by coding discipline, while Rust’s borrow checker and Drop system can turn the same class of mistakes into compile-time errors.
The report also pointed to friction with the upstream Zig community. It said Zig maintained a zero-tolerance stance toward LLM-generated code, and that even optimization changes unrelated to AI could not be merged upstream. Because Bun relies heavily on AI-assisted development, staying with Zig would have meant maintaining a separate compiler fork over the long term.
Andrew Kelley blamed engineering habits, not just tooling
In a recent blog post, Zig creator Andrew Kelley sharply criticized Sumner and the project’s engineering approach.

Kelley wrote that long before the rise of AI, Sumner had already been writing what he called bad code. He said the Zig team often reviewed user repositories and felt “extreme dread” when looking at Bun’s codebase, which he described as full of “hacks on top of hacks,” assertion abuse, and a pattern of shipping features quickly without taking time to reduce bugs or technical debt.
He also challenged the claim that the Rust rewrite was safe because it was covered by tests. Kelley asked: “Bun officials claim that 1 million lines of unaudited Rust (written by AI) are safe because there are test cases; if those tests were really that complete, why didn’t they catch those annoying bugs when Bun was written in Zig?”
Kelley said he was deeply disappointed to see Sumner change from an open-source developer with “beginner energy” into what he called a “stinky manager.” He also said that when he learned Bun was dropping Zig, he did not feel betrayed. He felt relieved. In his view, Bun carrying the Zig label risked creating the wrong impression of the language and attracting users who only copied and pasted AI-generated code. He wrote, sarcastically, that he was holding a cup of tea and was glad “this is finally not my problem.”

$165,000 in API spending sharpened the debate
The argument soon spread from language design to the economics of AI coding.
Based on figures published by Sumner and Bun, the Rust rewrite is expected to have consumed about $165,000 in API costs. The report said that, on paper, AI cut development cost to about one-tenth of the original level and reduced the timeline from roughly one year to less than two weeks.
That number drew attention because Claude’s token costs are often seen as expensive. At the same time, in the context of 1 million lines of code delivered in 11 days, many in the engineering world saw the price and speed as unsettlingly cheap.

Open-source norms and AI development are colliding
Reaction to Kelley’s post was split. Some readers found his public attack on a former major user and sponsor inappropriate. The report noted that Bun had long supported Zig financially. Some responses went further, with one saying they had “never so actively hoped for a programming language to fail.”
Others defended Kelley. They argued that in a period shaped by capital pressure and AI hype, he was standing up for engineering quality and showing a style associated with Linus Torvalds.
The key question now is maintainability
The biggest concern is no longer whether Bun could be rewritten. It is whether the new codebase will remain workable over time.
According to the report, the 1 million lines of code were translated mechanically from Zig into Rust by AI, without a human-led architectural redesign. The new repository is also said to retain as many as 27,000 lines of unsafe blocks.
That has led to a straightforward concern: the cognitive load and debugging cost involved in reading, modifying, and maintaining a large AI-generated codebase may eventually exceed the upfront savings in time and money.
Whether this project ends up as a milestone for a new software engineering model or as a difficult pile of technical debt is still unresolved.

