In Just 11 Days, Claude Rewrote Millions of Lines of Code, an Epic AI Engineering Feat Sparks Fury
In just 11 days, Bun's founder Jarred Sumner used Anthropic's Claude AI models to rewrite its million lines of code from Zig to Rust. This move sparked significant controversy, particularly from Zig's creator, Andrew Kelley, who publicly criticized Sumner's engineering practices and the decision to use AI for such a massive rewrite.
Bun, a high-performance JavaScript/TypeScript runtime and rival to Node.js, was originally written in Zig. After Anthropic acquired Bun, the team encountered persistent stability and memory safety bugs in the Zig codebase. These issues, combined with Zig's strict policy against LLM-generated code, led to the decision to rewrite in Rust. The rewrite was executed using Claude AI tools at an estimated API cost of $165,000, dramatically reducing the expected time and financial cost.
Andrew Kelley's response was scathing. He blamed the original bugs on poor engineering habits, calling Bun's Zig code a collection of "hacks on top of hacks." He expressed relief that Bun was no longer associated with Zig, fearing it would misrepresent the language and attract low-quality, AI-generated contributions. The tech community is divided; some view Kelley's critique as unprofessional, while others see it as a defense of engineering integrity.
A major concern about the AI-driven rewrite is the resulting code quality. The translation from Zig left approximately 27,000 lines of unsafe Rust code, raising fears about long-term maintainability and technical debt. The debate centers on whether this project is a milestone in AI-assisted development or a future maintenance nightmare.
marsbit2 h fa