{"slug": "bun-s-rust-rewrite-took-11-days-shipping-it-is-taking-months", "title": "Bun's Rust Rewrite Took 11 Days. Shipping It Is Taking Months", "summary": "Bun's rewrite from Zig to Rust took 11 days using Claude agents, but shipping the resulting code has taken months, with no v1.4.0 release after 11 weeks and a backlog of 2,475 open pull requests from its automation bot. The translation cost $165,000 in API fees, but ongoing CI and agent work have pushed total spending toward an estimated $800,000, according to developer Tom Lockwood's analysis. The bottleneck has shifted from code generation to verification, as agents open PRs faster than CI can run them.", "body_md": "[Dev Tools](https://sourcefeed.dev/c/dev-tools)Article\n\n# Bun's Rust Rewrite Took 11 Days. Shipping It Is Taking Months\n\nEleven weeks without a release and a 2,400-PR bot backlog show where AI-speed development really bottlenecks.\n\n[Lenn Voss](https://sourcefeed.dev/u/lennart_voss)\n\nOn July 8, [Bun](https://bun.com) announced it had rewritten itself from Zig to Rust: 535,496 lines translated in 11 days by a fleet of roughly 64 Claude agents, for about $165,000 in API costs. It's the most audacious AI-codegen story of the year, and the numbers are real. But today, seven weeks after that translated code merged to main, there's still no Bun v1.4.0 release — and the open pull requests from Bun's automation bot have roughly doubled in under three weeks. The translation took 11 days. The migration is still going, and how it plays out matters more than the headline.\n\n## What actually happened in those 11 days\n\nThe background: [Anthropic](https://www.anthropic.com) acquired Oven, the company behind Bun, in December 2025 — Claude Code ships as a Bun executable, so Bun's stability is now Anthropic's problem. And Bun had a stability problem. Jarred Sumner's announcement is unusually candid about it: the Zig codebase was riddled with use-after-free, double-free, and forgot-to-free bugs, one of which Sumner says caused the Claude Code source leak. [Zig](https://ziglang.org) gives you manual memory management with no borrow checker and no destructors; for a runtime juggling JavaScriptCore's garbage collector alongside its own allocations, that discipline never held.\n\nSo between May 3 and 14, Sumner ran about 50 dynamic Claude Code workflows across four git worktrees, peaking at 1,300 lines of generated [Rust](https://www.rust-lang.org) per minute, burning 5.9 billion uncached input tokens along the way. The result: just over a million lines of Rust, the full test suite green on all six supported platforms before merge (60,624 tests on Debian x64 alone), zero tests skipped or deleted, and 19 known regressions found and fixed. Measured wins followed: HTTP throughput up 2.8–4.8%, binaries about 20% smaller on Linux and Windows, and a build-API memory leak that used to grow ~3MB per invocation now flat — 609MB across 2,000 `Bun.build()`\n\ncalls where v1.3.14 ballooned to 6.7GB.\n\nMitchell Hashimoto called it an achievement no human team could match on cost. He's right on the arithmetic: a hand-rewrite of half a million lines is a year of a small team's time, easily $1.5–3M in payroll, with feature work frozen throughout. $165k and 11 days genuinely breaks that trade-off — for the translation step.\n\n## The part that doesn't fit the press release\n\nTom Lockwood pulled the thread today, and his numbers are the ones I'd watch. Bun's last tagged release, v1.3.14, shipped May 13 — that's eleven weeks and counting without a release, for a project that had been shipping roughly monthly (v1.3.12 on April 9, v1.3.13 on April 20). Meanwhile, open PRs from robobun, Bun's Claude-driven automation account, went from 1,277 on July 9 to 2,475 on July 27. At the 40–90 minutes of CI each PR takes, Lockwood estimates clearing the backlog would take on the order of 86 days of continuous pipeline time. His guess that total spend is approaching $800k is back-of-envelope and unverifiable, but the direction is right: $165k bought a translation, not a migration, and the meter is still running on CI, on ongoing agent work, and on the Anthropic engineers increasingly visible in the commit history.\n\nNone of this means the rewrite failed. v1.4.0 is available in canary builds, and a long stabilization window before releasing a transplanted runtime is arguably the responsible choice. But it does mean the \"11 days\" framing measured the wrong thing. Code generation stopped being the bottleneck; verification became it. When agents can open PRs faster than CI can run them and faster than anyone can review them, the backlog doesn't signal productivity — it signals that the constraint moved somewhere your tooling wasn't built to handle. That's the durable lesson here for any team pointing agent fleets at a large codebase, and almost nobody is budgeting for it.\n\n## Green tests are not a spec\n\nThe sharpest technical critique came from Zig creator Andrew Kelley, who called the result \"a million lines of unreviewed slop\" and posed the question that actually matters: if Bun's test suite wasn't good enough to keep the Zig code correct, why is it sufficient to validate a million lines of unreviewed Rust? The rewrite's entire correctness argument rests on the test suite being a complete spec, and no test suite is.\n\nThe community promptly produced evidence for his point. A Hacker News thread dissected the ported codebase failing basic [Miri](https://github.com/rust-lang/miri) checks — including a `PathString`\n\ntype that carried Zig's pointer-packing trick into APIs marked safe, meaning callers can trigger undefined behavior from safe Rust. The team says these are temporary artifacts of a deliberately faithful port, to be cleaned up in a later idiomatic-Rust pass, and that's plausible. But it punctures the comfortable assumption that \"it's Rust now\" equals \"the memory bugs are gone.\" About 4% of the new codebase is unsafe blocks, and unsound safe wrappers around them buy you Zig's failure modes with Rust's compile times. Kelley's broader jab — that LTO and better `comptime`\n\nhygiene could have delivered the binary-size wins in Zig — is score-settling from a bruised partnership, but the test-suite argument stands on its own.\n\n## What to do about it\n\nIf you run Bun in production: stay pinned to 1.3.14 and don't touch 1.4.0 the week it lands. The 19 fixed regressions were semantic drift between languages — exactly the bug class your dependency's test suite catches and yours doesn't. Run canary in a CI lane now if Bun is load-bearing for you; that costs one pipeline job and buys you months of warning. Watch how downstream projects behave, too — Electrobun has already decoupled its 2.0 from Bun over the rewrite, which tells you how projects with Bun in their foundations are pricing the risk.\n\nIf you're eyeing a similar AI-driven port: Bun is close to the best case — a single company controlling the repo, an enormous test suite, and effectively unmetered access to frontier-model capacity, and it's still weeks into an unshipped stabilization phase with a four-digit PR backlog. Budget your verification capacity — CI throughput, review bandwidth, fuzzing, Miri-equivalents — before you budget tokens, because that's where this actually gets expensive.\n\nMy read: the rewrite is genuinely impressive and probably the right call — Rust's ownership model fits a runtime better than Zig did, and the memory-leak numbers are already vindicating it. But it's merged, not done. The honest milestone isn't the 11-day translation; it's the day v1.4.0 ships and survives a month of real traffic. Until then, treat every \"AI rewrote X in N days\" headline as measuring the demo, not the delivery.\n\n## Sources & further reading\n\n-\n[How is the Bun Rewrite in Rust going?](https://lockwood.dev/ai/2026/07/27/how-is-the-bun-rewrite-in-rust-going.html)— lockwood.dev -\n[Rewriting Bun in Rust](https://bun.com/blog/bun-in-rust)— bun.com -\n[My Thoughts on the Bun Rust Rewrite](https://andrewkelley.me/post/my-thoughts-bun-rust-rewrite.html)— andrewkelley.me -\n[Zig creator calls Bun's Claude Rust rewrite 'unreviewed slop'](https://www.theregister.com/devops/2026/07/14/zig-creator-calls-buns-claude-rust-rewrite-unreviewed-slop/5270743)— theregister.com -\n[Bun Rust rewrite: codebase fails basic miri checks, allows for UB in safe rust](https://news.ycombinator.com/item?id=48150900)— news.ycombinator.com -\n[Bun is joining Anthropic](https://bun.com/blog/bun-joins-anthropic)— bun.com\n\n[Lenn Voss](https://sourcefeed.dev/u/lennart_voss)· Cloud & Infrastructure Writer\n\nLenn writes about cloud platforms, Kubernetes internals, and the infrastructure decisions that quietly make or break engineering organizations. Based in Berlin's vibrant tech scene, they have a talent for turning dense platform-engineering topics into prose that people actually finish reading.\n\n## Discussion 0\n\nNo comments yet\n\nBe the first to weigh in.", "url": "https://wpnews.pro/news/bun-s-rust-rewrite-took-11-days-shipping-it-is-taking-months", "canonical_source": "https://sourcefeed.dev/a/buns-rust-rewrite-took-11-days-shipping-it-is-taking-months", "published_at": "2026-07-27 13:09:43+00:00", "updated_at": "2026-07-27 13:27:25.128071+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "large-language-models", "ai-agents"], "entities": ["Bun", "Anthropic", "Claude", "Oven", "Jarred Sumner", "Tom Lockwood", "Zig", "Rust"], "alternates": {"html": "https://wpnews.pro/news/bun-s-rust-rewrite-took-11-days-shipping-it-is-taking-months", "markdown": "https://wpnews.pro/news/bun-s-rust-rewrite-took-11-days-shipping-it-is-taking-months.md", "text": "https://wpnews.pro/news/bun-s-rust-rewrite-took-11-days-shipping-it-is-taking-months.txt", "jsonld": "https://wpnews.pro/news/bun-s-rust-rewrite-took-11-days-shipping-it-is-taking-months.jsonld"}}