Bun's AI-Assisted Rust Rewrite Sparks Feud with Zig Creator
Bun, the high-performance JavaScript runtime, has completed a significant mechanical port of its extensive codebase from Zig to Rust, a feat largely facilitated by Anthropic’s Claude AI. Jared, Bun’s creator, detailed the migration in a recent blog post, citing persistent stability issues as the primary driver. Despite robust efforts in the Zig codebase—including compiler patching for Address Sanitizer support, continuous fuzzing with tools like Jazzy, and extensive memory leak tests—the complexities of explicitly managing memory in a mixed garbage-collected (JavaScript) and manually-managed environment led to ongoing challenges like memory leaks and crashes. The AI-driven rewrite, executed over 11 days using Claude Code’s dynamic workflows, involved translating over 1 million lines of Zig code. This process reportedly fixed 128 existing bugs, reduced memory usage, trimmed binary size, and delivered a 2-5% performance boost, all for an estimated $165,000 in API costs—a fraction of the projected year-long effort for a human team and demonstrating a new frontier for large-scale code migrations.
However, this technical milestone was met with an extraordinarily critical public response from Andrew Kelly, the creator of the Zig programming language. In his blog post, Kelly expressed relief at Bun’s departure, accusing Jared of exhibiting ‘strong beginner energy,’ lacking management skills, and adopting a ‘Silicon Valley mindset’ for taking venture capital. He characterized Bun’s Zig codebase as ‘hacks on top of hacks’ and ‘recklessly speeding past features,’ implying irresponsible engineering practices that made Bun a ‘net liability’ to the Zig Foundation. Kelly’s post, which underwent subsequent edits to soften some language and included a disclaimer denying personal criticisms of Jared, was widely perceived by the tech community as unprofessional and an unwarranted personal attack. This reaction has sparked significant debate about maintainer-user relations and the impact of such discourse on a language’s community and adoption.