
Bun, a JavaScript tool, has been completely rewritten from Zig to Rust using Anthropic's Claude Fable 5 AI model. The rewrite took 11 days and produced over a million lines of code—work a human team would have needed about a year to complete. The new version fixes 128 bugs and runs 2 to 5 percent faster, addressing the memory errors and crashes that plagued the original Zig implementation.
Summaries like this, in your inbox every morning.
Sign up free →What happened
The JavaScript tool Bun has been fully rewritten from Zig to Rust. Anthropic's Claude Fable 5 (a pre-release version) wrote over a million lines of code in 11 days, running about 64 parallel instances. The API bill came to roughly $165,000. The new version, Bun v1.4.0, is now available as a canary release, fixes 128 bugs, and runs about 2 to 5 percent faster.
Why it matters
Developer Jarred Sumner chose Rust because Zig kept producing memory errors and crashes that were hard to fix permanently; Rust catches many of those bugs at compile time instead. A human team would have needed about a year to complete the rewrite. Bun and his team were acquired by Anthropic in December 2025, so the cost was bearable for the parent company.
What to watch
Bun v1.4.0 is available as a canary release (an early, unstable version for testing). The 2 to 5 percent speed improvement and 128 bug fixes represent the tangible gains from the rewrite.
The rewrite showcases how large language models can accelerate engineering tasks that traditionally require months of human effort. Anthropic's acquisition of Bun in December 2025 positioned the company to invest heavily in this modernization: a $165,000 API bill, though substantial, was economically justified given the year of engineering time it replaced. The shift from Zig to Rust reflects a practical engineering trade-off—Zig offers lower-level control and smaller output sizes, but Rust's compile-time safety checks proved more valuable for a tool that had suffered from hard-to-diagnose runtime failures.
The measurable outcomes (2 to 5 percent faster execution, 128 fixes) suggest the rewrite was not merely a language migration but a genuine stabilization effort. The availability as a canary release indicates Anthropic is testing the new codebase carefully before promoting it to default use—a prudent approach given the scope of the change. For the JavaScript ecosystem, a faster and more stable Bun may represent a meaningful update to an alternative build tool that has been growing in adoption.
No comments yet. Be the first to share your thoughts!
Log in to join the discussion





Get curated AI news from 200+ sources delivered daily to your inbox. Free to use.
Get Started FreeFree · takes 30 seconds · unsubscribe anytime
1 minute a day. The AI essentials.
200+ sources · Email / LINE / Slack