Controversy Erupts as Bun is Rewritten in Rust
机器之心 · wechat · 2026-07-11
This article discusses the controversy surrounding the Bun team rewriting their runtime from Zig to Rust, contextualizing it within AI-assisted programming and engineering culture clashes.
What Happened
- Bun was originally a high-performance JavaScript/TypeScript runtime written in Zig, later acquired by Anthropic to power Claude Code and Claude Agent SDK.
- The team felt the Zig version exposed massive stability and memory safety issues at scale, such as use-after-free, double-free, and memory leaks.
- Since Zig upstream maintains a zero-tolerance policy for LLM-generated code, and Bun heavily relies on AI-assisted development, maintaining the Zig branch became too costly.
- Consequently, the Bun team rewrote about 1 million lines of code into Rust in roughly 11 days, utilizing unpublished Anthropic models and Claude Code's dynamic workflow capabilities.
Points of Controversy
- Zig founder Andrew Kelley publicly blasted Bun founder Jarred Sumner, arguing that the root cause wasn't just the language, but long-standing poor engineering habits and technical debt.
- He questioned the safety of "AI-generated million-line Rust code," specifically whether testing could cover bugs that the previous Zig version hadn't exposed.
- The community became sharply divided over "engineering purity vs. AI acceleration" and "open-source culture vs. commercial efficiency."
Numbers and Aftermath
- This Rust rewrite reportedly cost about $165,000 in API fees.
- Supporters argue it's an incredible engineering feat to compress a year-long refactor into less than two weeks.
- Critics worry that while initial development was incredibly fast, the massive amount of legacy unsafe code and literal AI translation will create much higher cognitive costs for future maintenance.
Related event: Bun's Rust Rewrite Sparks AI Coding Debate(3 posts)→
More from coding & agent
- Building a Secure AI Agent Gateway: Self-Hosting OAuth for Multiple SaaS Apps — Defiant_Cod_2654 · 2026-07-22
- Rowboat launches as an open-source, local-first AI coworker with memory — ycombinator · 2026-07-22
- Scoble says AI “loops” really means long-running multi-agent workspaces — Scobleizer · 2026-07-22
- Kimi Code opens a waitlist as Moonshot rolls out its coding product — Fabulous_Bonus_8981 · 2026-07-22
- Open-source runtime lets each repo define its own AI code reviewer — ibabufrik · 2026-07-22
- Indie Dev Asks: What's Actually Broken in Your AI Agent's Memory Today? — AcceptableTime7937 · 2026-07-22