# Rewriting Bun in Rust — Jarred Sumner details the 11-day AI-agent port

> Bun's creator writes up how Claude Code and Claude Fable 5 rewrote 1,448 Zig files into Rust across 11 days.

- Org: Bun
- Date: 2026-07-08
- Category: article
- Source: https://bun.com/blog/bun-in-rust
- Canonical page: https://ai-tldr.dev/releases/bun-in-rust-writeup-jul8/

## In short

Bun creator Jarred Sumner published a post-mortem on porting Bun from Zig to Rust in 11 days using Claude Code and a pre-release Claude Fable 5. The writeup lists 6,502 commits, 5.9B input tokens, ~64 concurrent agents at peak, and 128 fixed bugs.

## What it is

'Rewriting Bun in Rust' is a July 8 post-mortem Jarred Sumner published on the Bun blog. The article recounts porting Bun's Zig codebase to Rust in 11 days (May 3 – May 14) using Claude Code, a pre-release Claude Fable 5, and roughly 50 dynamic workflows running in parallel across four git worktrees.

## How it works

Sumner's workflow ran a code-writing Claude agent alongside two review agents whose only job was to find reasons the code failed — a setup he credits with catching a use-after-free in the process-spawning code before merge. Peak concurrency was about 64 agents at once, and the run consumed 5.9B input tokens and 690M output tokens, producing 6,502 commits at a peak rate of 695 commits per hour.

## Why it matters

The writeup gives the AI-coding community the most detailed public accounting yet of a real, shipped, million-line-plus rewrite by agents. Numbers that are usually opaque — commit rates, token spend, unsafe-code ratio, regressions per merge — are all on record, and the choice of Rust is framed as much about contributor pool as memory safety. Simon Willison's coverage is what pushed the piece onto the front page today.

## Who it's for

Developers weighing agent-driven rewrites of their own codebases, and researchers studying how adversarial review scales with model quality.

## Try it

Read the full post at bun.com/blog/bun-in-rust and Simon Willison's summary at simonwillison.net.

## Links

- [Post](https://bun.com/blog/bun-in-rust)
- [Simon Willison writeup](https://simonwillison.net/2026/Jul/8/rewriting-bun-in-rust/)
- [PR #30412 (merged May 14)](https://github.com/oven-sh/bun/pull/30412)
- [Author on X](https://x.com/jarredsumner)
