Anthropic has used AI to migrate Bun, the popular JavaScript runtime it acquired in late 2025, from Zig to Rust in just eleven days. While the speed of the migration has drawn admiration, the approach has also sparked strong criticism from the Zig community.
According to Bun’s creator, Jarred Sumner, the switch was necessary because the codebase was becoming increasingly difficult to maintain. Users reported a growing number of bugs, and a flaw in the bundler even played a role in the leak of Claude Code’s source code earlier this year, writes The Register. A complete rewrite of approximately half a million lines of code would normally take a team of developers about a year, he said. By deploying dozens of Claude Code agents in parallel, Sumner says the migration was completed in eleven days. At standard API rates, that would have cost about $165,000.
Approximately fifty AI workflows were deployed simultaneously for the conversion. At peak times, they collectively produced about 1,300 lines of Rust code per minute. Ultimately, a new codebase of over one million lines was created. According to Sumner, the new Rust version then passed Bun’s entire test suite, which consists of more than one million tests, without any modifications.
Rust is better suited for memory management
Bun combines a JavaScript runtime with a package manager, bundler, and test runner. From the start, Sumner chose Apple’s JavaScriptCore engine over Google’s V8 for performance reasons. At the time, the choice also fell on Zig, which offers a high degree of control over system resources.
According to Sumner, that choice eventually proved less suitable for the way Bun handles memory internally. The software combines garbage collection with manual memory management, an approach for which he believes Rust is better equipped thanks to its built-in safety mechanisms for memory management. He emphasizes that the resulting problems are not attributable to Zig itself.
Zig creator points to programming style
Andrew Kelley, the creator of Zig, sees things very differently. In a detailed response, he argues that the problems do not stem from the programming language, but from the way Bun was developed. According to him, technical debt, poor error handling, and a constant focus on new functionality had been piling up for a long time.
Kelley also claims that Sumner “was already writing messy code before large language models became available.” He suspects that business objectives began to take precedence over software quality, especially after Anthropic acquired Bun.
The creator of Zig therefore says he is actually relieved that Bun is parting ways with Zig. For years, the project was considered one of the best-known applications of the language, while Kelley believes that the codebase was, in fact, not a good example of how Zig should be used.
AI code without review
A more significant point of criticism concerns the use of AI itself. According to Kelley, the Bun team had previously attempted to incorporate AI-generated changes into the Zig project. These were rejected because the Zig Software Foundation does not accept code written by AI without thorough human review.
He also doubts whether the extensive test suite provides sufficient assurance. If previous bugs slipped into the Zig version unnoticed despite those tests, he argues there is little reason to assume that a Rust codebase generated entirely by AI would be error-free.
The discussion thus touches on a broader issue within software development. AI makes it possible to produce enormous amounts of code in a very short time, but at the same time raises questions about quality, maintainability, and the role of human code review. The migration of Bun is therefore not only a technical experiment but also a test case for how AI might transform large-scale software projects in the future.