
Bun Rewrote 535K Lines From Zig to Rust in 11 Days With Claude, for ~$165K
Quick verdict
Jarred Sumner, the creator of Bun, ported the runtime's 535,496 lines of Zig to Rust in 11 days using pre-release Claude Fable 5, running roughly 50 dynamic workflows with up to 64 Claude instances at once. The API-equivalent spend was about $165K. By hand, he estimated three engineers with full context would have needed about a year with nothing else on their plates. It is a real result. It is also not the "one prompt and you are done" story people want it to be. The expensive input here was Jarred's own context on the codebase, not just the credits.
What actually shipped
According to Bun's own writeup, the rewrite was driven by Claude Code dynamic workflows against a detailed upfront plan, with a human watching the whole way. The specifics:
- 535,496 lines of Zig ported to Rust in 11 days
- Roughly 50 workflows running up to 64 Claude instances in parallel
- Estimated ~$165K in API-equivalent Fable 5 usage
- An upfront PORTING.md plan plus continuous human monitoring
- Adversarial review, where separate Claude contexts acted as reviewers of the generated code
The output went past a straight mechanical translation. Bun v1.4.0, the first release on the Rust codebase, reported 128 bugs fixed versus v1.3.14, eliminated the instrumentable memory leaks, produced roughly 20% smaller Linux and Windows binaries, and cut Linux startup time about 10% for recent Claude Code builds.
| Metric | Result |
|---|---|
| Lines ported (Zig to Rust) | 535,496 |
| Wall-clock time | 11 days |
| Parallel Claude instances | up to 64 |
| API-equivalent cost | ~$165K |
| Bugs fixed vs prior release | 128 |
| Binary size reduction | ~20% (Linux / Windows) |
What the number actually proves
The reaction on Reddit was skeptical in a useful way. The top comments did not dispute the result. They disputed the framing. One put it bluntly: Bun was rewritten by a Thiel Fellow with deep runtime expertise who happened to spend $165K of Claude credits. The model was an accelerator, not an autonomous replacement. The rewrite worked because the human already knew exactly what the code needed to do, could write a real PORTING.md, and could catch the model when it drifted.
Two other caveats came up. Quoting API pricing inflates the perceived spend versus internal or discounted usage, so $165K is a headline number, not a receipt. And a language-runtime rewrite is close to a best case for this workflow: the target behavior is fully specified by the existing code and the test suite, which is exactly the kind of verifiable spec that lets you run 64 agents in parallel and trust the output. Most product work does not come with that spec.
Why it matters
Even with every caveat, this is the clearest data point yet on parallel-agent coding at scale. The interesting shift is not that Claude wrote Rust. It is the shape of the workflow: an upfront plan, dozens of concurrent agents, and separate reviewer contexts doing adversarial review of the generated code. That is a harness, not a chat. It lines up with the wider theme that the model is becoming a commodity and the orchestration around it is becoming the product.
For anyone running coding agents day to day, the practical takeaways are concrete. Verifiable specs, like an existing implementation plus a test suite, are what make heavy parallelism safe. Cost scales fast when subagents inherit premium settings, so the $165K is as much a lesson about spend control as about capability. That is the same routing and cost discipline we cover in cutting coding-agent costs with model routing. If you are choosing a tool for this kind of work, our guide to the best AI coding agents and our Claude Code vs Cursor vs Codex comparison lay out where each one fits.
The honest read: this shows what is possible at the frontier of skill plus spend, not what is reproducible for a typical team on a typical codebase. Treat it as a ceiling, and copy the workflow discipline before you copy the budget.
Video: Bun's 535K-line rewrite, explained
A walkthrough of how Bun used parallel AI agents to move the whole runtime from Zig to Rust, and what the process actually looked like.
FAQ
How much did the Bun rewrite cost?
About $165K in API-equivalent Claude Fable 5 usage, by the project's own estimate. That figure quotes public API pricing, so the real internal cost may differ. The point most people missed is that the spend bought acceleration on top of deep expertise, not a shortcut around it.
Did AI write the whole thing unsupervised?
No. The rewrite ran on a detailed upfront plan (PORTING.md), continuous human monitoring, and adversarial review where separate Claude contexts checked the generated code. Jarred's own knowledge of the Bun codebase was the enabling factor, with the model doing the volume.
Can my team reproduce this?
Partly. The workflow, an upfront spec, parallel agents, and reviewer contexts, is reproducible and worth copying. The result is not guaranteed: a runtime rewrite is unusually well-specified by its existing code and tests, and most product work lacks that verifiable target. Start with the discipline, not the 64-agent budget.
Is Claude Fable 5 the best model for large coding jobs?
It is at the frontier for agentic coding, but "best" depends on the task and the budget. Cheaper tiers handle a lot of the load at a fraction of the cost, which is why routing matters. See our roundup of the best AI coding agents for the current field.
Sources
- Bun - rewriting Bun from Zig to Rust with Claude Code dynamic workflows
- r/ClaudeCode - discussion of the 11-day, ~$165K Bun rewrite
Further reading
Try all the models mentioned in this article
Admix gives you GPT-5, Claude, Gemini, and 350+ AI models in one app. Compare responses side by side. Free to start.
Start free on Admix