Bun's Rust Rewrite: The Real Cost of AI-Assisted Code

On July 8, 2026, Bun creator Jarred Sumner dropped a number that lit up developer communities: 535,000 lines of Zig ported to Rust in 11 days, at a cost of $165,000 in Anthropic API calls. The reactions split into two camps β those hailing it as a new era of AI coding, and those, led by Zig creator Andrew Kelley, calling it "unreviewed slop."
Three weeks later, a detailed analysis by Tom Lockwood (published July 27, reaching 424 points on Hacker News) shows both camps were wrong. The reality is far messier β and more instructive.
The real numbers: 2,475 open PRs
Lockwood cloned the Bun repo and dug into the data. What he found contradicts the "completed in 11 days" narrative:
- On July 9, robobun β the Claude agent behind the rewrite β had 1,277 open PRs.
- By July 27, that number nearly doubled to 2,475.
- Each PR takes 40β90 minutes through CI/CD. At current throughput, 86 continuous pipeline-days are needed to clear the backlog.
- 11 weeks without a release. The last stable tag was bun-v1.3.14 on May 12. The previous longest gap was 6 weeks (OctβDec 2022).
And the cost? Not $165,000. Lockwood estimates ongoing spend at roughly $10,000 per day in API calls and CI/CD, pushing the total toward $800,000 β nearly 5Γ the headline figure.
The rewrite wasn't "done in 11 days." It's still running.
Claude Code already ships Rust Bun β just quietly
While the community debated whether the Rust build was production-ready, Simon Willison inspected the Claude Code binary on July 19 and found it embedding Bun v1.4.0 (macOS arm64) with Rust source paths like src/runtime/bake/dev_server/mod.rs.
Claude Code has millions of installs. Rust Bun has been in production at scale for weeks. Anthropic just didn't need a press release. Willison's verdict: "Boring is good. The rewrite is largely invisible to users, which means stability."
This is a meaningful signal. When the team that built the AI that wrote the code stakes their flagship product on the canary, "production-ready" stops being an open question.
Prisma confirms: the canary genuinely works better
Kelley's "unreviewed slop" argument has a strong premise: nobody read a million lines of AI-generated Rust. But production data from Prisma weakens his strongest claim.
Prisma's engineering team deployed the Rust canary against the same failure modes they'd been hitting on stable Bun:
- S3 memory leak: stable Bun peaked past 900 MB. The canary: just 118 MB β a 7.5Γ reduction.
- SQL connection pool: stable Bun hung permanently after scale-to-zero. The canary recovered correctly.
- Prisma's conclusion: "The specific failure we kept hitting in Compute went away on the canary."
These aren't synthetic benchmarks. This is a real production workload.
Kelley is right that no human reviewed all million lines. He's wrong if the conclusion is that unreviewed means unreliable. The Rust compiler and a comprehensive test suite β over 1 million assertions, 100% pass rate across all platforms β caught what manual review would have. Prisma's production data disproves the strongest version of his critique.
What we actually learned
The Bun Rust rewrite isn't a story about AI being better than humans, or AI producing slop. It's something more nuanced β and more useful:
1. AI makes the impossible possible. HashiCorp co-founder Mitchell Hashimoto noted: "There's absolutely no way an engineer with that salary would've been able to achieve the milestones Claude did in 11 days." This is true.
2. "Possible" doesn't mean "finished." The real cost is nearly 5Γ the headline number. The 2,475-PR backlog shows AI didn't eliminate the bottleneck β it moved it from writing code to reviewing, testing, and CI/CD throughput.
3. "Unreviewed" doesn't mean "unreliable" β if your test suite is comprehensive enough. The Rust compiler and test suite did the reviewer's job. Prisma proved it in production. But this only holds when your test coverage is exceptional. That's the prerequisite for any AI rewrite you're considering.
4. If you trust AI-generated code, you better trust your CI/CD. 86 pipeline-days to clear the backlog is sobering. When code generation speed outpaces verification speed, the bottleneck shifts β it doesn't disappear.
5. Anthropic is dogfooding at the highest level. Shipping Rust Bun inside Claude Code β their flagship product with millions of users β is more convincing than any benchmark. This is what real confidence looks like.
What developers should do
- Try the Rust canary if your workload resembles Prisma's: memory-intensive S3, scale-to-zero databases, high connection churn. Run
bun upgrade --canary. - Don't trust AI rewrite cost numbers at face value. These figures rarely include CI/CD, review overhead, and post-merge maintenance.
- Your test suite is your last line of defense. If you're considering an AI rewrite, invest in tests first. Bun's 100% pass rate is the main reason the Rust build works.
- Watch the PR backlog, not just the merge count. Open PRs are a more honest indicator of project state than lines of code merged.
- Bun v1.4.0 stable has no release date. With 2,475 PRs in the queue, expect weeks to months before a stable tag.
The Bun Rust rewrite is the perfect case study for how AI is changing software engineering β not through magic, but by fundamentally reshaping where the bottlenecks live.
Content assisted by AI (Amy πΈ). Reviewed by the author.
Related Posts
Claude Opus 5 is Here: Near-Fable 5 Intelligence at Half the Cost
Anthropic launches Claude Opus 5: #1 SWE-bench 97%, near-Fable 5 quality at half the cost. Same $5/$25 pricing, double Frontier-Bench vs Opus 4.8.
Claude Opus 4.8 Is Here: Dynamic Workflows, Effort Control, and a Major Quality Leap
Anthropic just dropped Claude Opus 4.8 with Dynamic Workflows for Claude Code, effort controls, and notable improvements in reliability and honesty. I've tested it β here's what matters.
AI Hunts Security Vulnerabilities: 10,000+ CVEs Found in 1 Month with Claude Mythos
Anthropic found over 10,000 critical security vulnerabilities in open-source software in one month. The AI bug-hunting era has arrived.