BotBeat
...
← Back

> ▌

AnthropicAnthropic
UPDATEAnthropic2026-05-15

Anthropic's Bun Completes Massive Rust Rewrite Using AI, Merges Million-Line Commit

Key Takeaways

  • ▸Over 1 million lines of Rust code merged in a single gargantuan commit, replacing Bun's Zig codebase
  • ▸99.8% of Bun's test suite passes on the rewritten version with neutral or improved performance
  • ▸Binary size reduced by 3-8 MB and memory leak vulnerabilities significantly mitigated through Rust's compiler safety features
Source:
Hacker Newshttps://www.theregister.com/devops/2026/05/14/anthropics-bun-rust-rewrite-merged-at-speed-of-ai/5240381↗

Summary

Anthropic has successfully merged a Rust rewrite of its Bun JavaScript toolkit and runtime, replacing the original Zig codebase in a historic single commit containing over one million lines of code. Version 1.3.14 was released as the final Zig version, with Bun creator Jared Sumner confirming that 99.8% of the existing test suite passes on the new Rust implementation across all platforms.

The rewrite delivers substantial improvements: binary size shrinks by 3-8 MB, memory leak issues are mitigated through Rust's compiler-assisted memory safety guarantees, and the codebase achieves performance parity or better while maintaining the same architecture and data structures. Sumner emphasized that the transition eliminates entire categories of memory bugs that plagued the team for years, particularly use-after-free and double-free errors.

What sets this project apart is its scale and speed—executed almost entirely by Anthropic's Claude Code AI assistant. Sumner revealed that the Bun team has relied on AI to write code for months, even before Anthropic's acquisition. The rapid rewrite was driven partly by frustration with Zig's policy against AI-assisted development, forcing the team to maintain a Zig fork incompatible with upstream contributions. The sheer size of the commits triggered GitHub's AI-detection filters, with one 600,000-line Zig-removal PR automatically flagged as "AI slop."

The community has reacted with a mix of enthusiasm and surprise, with some questioning the reviewability of such massive automated commits. However, the successful integration demonstrates a production-grade software rewrite entirely powered by AI-assisted development at an unprecedented scale and velocity.

  • Anthropic's Claude Code AI tool authored the majority of the port, demonstrating production-scale AI-assisted development
  • Marks the end of Bun's Zig era; decision driven partly by Zig's anti-AI policy conflicting with Bun's development workflow
Generative AIAI AgentsMLOps & InfrastructureOpen Source

More from Anthropic

AnthropicAnthropic
POLICY & REGULATION

Anthropic Urges Stricter US Controls on China's AI Development Before 2028

2026-05-15
AnthropicAnthropic
INDUSTRY REPORT

U.S. Grapples With 1,200+ AI Bills and No Consensus Testing Standard for Regulation

2026-05-15
AnthropicAnthropic
POLICY & REGULATION

Anthropic Restructures Agent SDK Billing, Separates from Subscription Plans Starting June 15

2026-05-15

Comments

Suggested

Academic ResearchAcademic Research
RESEARCH

AI Agents Modulate Their Language When Framed as Being Watched

2026-05-15
AnthropicAnthropic
POLICY & REGULATION

Anthropic Urges Stricter US Controls on China's AI Development Before 2028

2026-05-15
RecursantRecursant
OPEN SOURCE

Recursant Open Source Control Plane Adds Governance Plugin for OpenClaw

2026-05-15
← Back to news
© 2026 BotBeat
AboutPrivacy PolicyTerms of ServiceContact Us