Close Menu
WithO2WithO2

    Subscribe to Updates

    Get the latest AI News Tools Updates in your Inbox

    What's Hot

    Microsoft Patches 570 Flaws — Record Patch Tuesday, 3 Zero-Days

    July 15, 2026

    Cursor 0day: Cloning a Repo Can Hack Your Computer

    July 15, 2026

    Rippling vs Gusto vs BambooHR: Full HRMS Comparison 2026

    July 15, 2026

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    Facebook X (Twitter) Instagram
    Facebook X (Twitter) Instagram
    WithO2WithO2
    • AI
    • Blog
    • Business Software
    • Trending News
    • Stories
    WithO2WithO2
    Home » Trending News
    Trending News

    Claude Fable 5 Rewrote Bun in Rust — 1 Million Lines for $165K

    By Amitabh SarkarJuly 15, 20265 Mins Read0
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    Claude Fable 5 rewrote Bun in Rust: 1 million lines of AI-generated code for $165K
    Anthropic's Claude Fable 5 converted Bun's Zig codebase into over a million lines of Rust with 99.8% test compatibility.
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Bun, the JavaScript runtime Anthropic acquired in December 2025, has been rewritten from Zig to Rust largely by Claude Fable 5. The AI-assisted rewrite produced 1,009,257 lines of Rust at an estimated API cost of $165,000, with 99.8% of tests passing on Linux x64.

    Bun founder Jarred Sumner announced the Rust rewrite on July 8, 2026 on the official Bun blog, and the announcement carried a second surprise: Anthropic acquired Bun in December 2025, a deal not widely reported at the time. The rewrite converted Bun’s 535,496-line Zig codebase into more than a million lines of Rust using a pre-release version of Claude Fable 5 — the most concrete public evidence yet that frontier AI models can execute enterprise-scale rewrites, not just toy projects.

    • Scale: 1,009,257 lines of Rust added, 2,188 files changed, 6,755 commits in the merged pull request
    • Cost: an estimated $165,000 at API pricing — 5.9 billion uncached input tokens and 690 million output tokens
    • Quality: 99.8% test compatibility on Linux x64 glibc
    • Status: experimental parallel work — stable Bun still ships from the Zig codebase
    • Ownership: Anthropic acquired Bun in December 2025 (price not disclosed)

    Table of Contents

    Toggle
    • What Actually Happened — The Key Numbers
    • Why Bun Left Zig for Rust
    • The Quiet Anthropic Acquisition — Why It Matters
    • What This Means for Developers
    • FAQ

    What Actually Happened — The Key Numbers

    According to analysis by Simon Willison of the merged pull request, the rewrite added 1,009,257 lines of Rust while deleting 4,024 lines of Zig across 6,755 commits, as detailed on simonwillison.net. The original Bun codebase measured 535,496 lines of Zig excluding comments — meaning the Rust version is nearly double the line count, a typical trade-off given Rust’s more explicit error handling and memory-safety annotations.

    The token bill tells the AI story: 5.9 billion uncached input tokens and 690 million output tokens through a pre-release Claude Fable 5, roughly $165,000 at API pricing. A human engineering team doing an equivalent rewrite would plausibly cost millions of dollars and take years.

    Why Bun Left Zig for Rust

    The motivation was memory safety, not speed. Per the Bun team’s announcement: “A large percentage of bugs in the existing codebase were use-after-free, double-free, and ‘forgot to free’ errors in error paths, which in safe Rust are compiler errors with automatic cleanup via Drop.” Zig, chosen by Sumner for its speed and low-level control, lacks Rust’s borrow checker — so an entire class of memory bugs that shipped in Zig simply fails to compile in Rust. Deno, Bun’s closest runtime rival after Node.js, is already built in Rust.

    The Quiet Anthropic Acquisition — Why It Matters

    The December 2025 acquisition makes Bun an Anthropic product, giving the company a direct stake in JavaScript developer tooling — the same audience OpenAI courts with Codex and SpaceXAI courts with Grok 4.5 and Cursor. Anthropic appears to be building toward owning the AI-native developer workflow from the runtime up, consistent with the direction of Anthropic’s AI research and the rollout of Claude Fable 5 across its products this month. Importantly, Anthropic did not build Bun — Jarred Sumner and team did — and the acquisition price has not been reported.

    What This Means for Developers

    Nothing changes today. Stable Bun releases continue to ship from the Zig codebase, and the Rust rewrite is parallel experimental work. The Bun team says the Rust version will become the default only when it reaches feature and compatibility parity across all supported platforms. There are no published performance benchmarks comparing the Zig and Rust builds yet, so claims about speed differences remain speculation. The developer discussion is substantial — the announcement drew a 427-point thread with 221 comments on Hacker News.

    💡 Our Take: Anthropic just used its own flagship AI to rewrite a million lines of production code — and it worked. This isn’t a demo; it’s Claude Fable 5 doing what would be an engineering team’s multi-year job for $165K in API costs. AI coding isn’t coming for enterprise-scale work “eventually” — at Fable 5’s level, it’s already doing it.

    FAQ

    Did AI really rewrite the entire Bun codebase?

    Largely, yes. The Bun team used a pre-release version of Anthropic’s Claude Fable 5 to convert 535,496 lines of Zig into over a million lines of Rust, consuming 5.9 billion input tokens. The result passes 99.8% of Bun’s test suite on Linux x64.

    How much did the Bun Rust rewrite cost?

    An estimated $165,000 at Claude API pricing, based on 5.9 billion uncached input tokens and 690 million output tokens, per Simon Willison’s analysis. A comparable human-led rewrite would likely cost millions of dollars over multiple years.

    Does Anthropic own Bun?

    Yes. The July 8, 2026 announcement revealed that Anthropic acquired Bun in December 2025, which had not been widely reported. The acquisition price has not been disclosed. Bun was originally built by Jarred Sumner and his team.

    Is the Rust version of Bun available now?

    No. The Rust rewrite is experimental parallel work, and stable Bun releases still ship from the original Zig codebase. The Rust build will become the default only once it reaches feature and compatibility parity across all supported platforms.

    Why did Bun switch from Zig to Rust?

    Memory safety. The team reported that a large share of Bun’s bugs were use-after-free, double-free, and forgot-to-free errors — bugs that Rust’s borrow checker turns into compile-time errors with automatic cleanup. Zig offers speed and control but no equivalent compile-time memory guarantees.

    Last Updated: July 2026

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Amitabh Sarkar
    • Website

    I am a software engineer, I have a passion for working with cutting-edge technologies and staying up-to-date with the latest developments in the field. In my articles, I share my knowledge and insights on a range of topics, including business software, how to set up tools, and the latest trends in the tech industry.

    Related Posts

    Microsoft Patches 570 Flaws — Record Patch Tuesday, 3 Zero-Days

    July 15, 2026

    Cursor 0day: Cloning a Repo Can Hack Your Computer

    July 15, 2026

    Grok 4.5 Is Here: SpaceXAI’s Opus-Class AI at a Fraction of the Price

    July 15, 2026

    Comments are closed.

    Don't Miss
    Trending News

    Microsoft Patches 570 Flaws — Record Patch Tuesday, 3 Zero-Days

    By Amitabh SarkarJuly 15, 2026

    Microsoft’s July 2026 Patch Tuesday is the largest in company history: 570 vulnerabilities patched across…

    Cursor 0day: Cloning a Repo Can Hack Your Computer

    July 15, 2026

    Rippling vs Gusto vs BambooHR: Full HRMS Comparison 2026

    July 15, 2026

    Grok 4.5 Is Here: SpaceXAI’s Opus-Class AI at a Fraction of the Price

    July 15, 2026

    Subscribe to Updates

    Get the latest creative news from SmartMag about art & design.

    Stay In Touch
    • Facebook
    • Twitter
    • Pinterest
    • Instagram
    Our Picks

    Rippling vs Gusto vs BambooHR: Full HRMS Comparison 2026

    July 15, 2026

    Best HRMS Software 2026: Top 10 HR Systems Compared

    July 8, 2026

    Best Ecommerce Platform 2026: Top 10 Options Compared

    July 5, 2026

    Hostinger vs Bluehost 2026: Which Cheap Host Wins?

    July 3, 2026
    Editors Picks

    Microsoft Patches 570 Flaws — Record Patch Tuesday, 3 Zero-Days

    July 15, 2026

    Cursor 0day: Cloning a Repo Can Hack Your Computer

    July 15, 2026

    Grok 4.5 Is Here: SpaceXAI’s Opus-Class AI at a Fraction of the Price

    July 15, 2026

    OpenAI GPT-Live Makes ChatGPT Voice Sound Like a Real Conversation

    July 15, 2026
    About Us
    About Us

    Your Source for Innovation: Discover in-depth guides, solutions, and tools tailored to modern business challenges.

    Links
    • Blog
    • Privacy Policy
    • Contact WithO2.com
    • Terms and Conditions
    Facebook X (Twitter) Instagram Pinterest
    • About
    • Editorial Policy
    • Contact
    • Privacy Policy
    • Terms
    © 2026 WITHO2.COM

    Type above and press Enter to search. Press Esc to cancel.