Bun's Rust Rewrite: The Real Playbook for Agentic Migrations Bun ported 535,000 lines of Zig into a million lines of Rust in 11 days for $165,000, using 64 parallel Claude agents, but the Zig language's creator called the result 'unreviewed slop.' The success hinged on a pre-existing test suite built over years, not the AI agents, and the playbook includes four reusable mechanisms: mechanical port first, PORTING.md as a translation contract, LIFETIMES.tsv as an ownership ledger, and more. Member-only story Bun’s Rust Rewrite: A Playbook for Large Codebase Migrations The 11-day rewrite that sparked an industry debate holds a much deeper lesson: test suite readiness as a hard gate. The 11-day rewrite that sparked an industry debate holds a much deeper lesson: test suite readiness as a hard gate. Bun ported 535,000 lines of Zig into a million lines of Rust in 11 days for $165,000 — and the Zig language’s own creator called the result “unreviewed slop.” The gap between these two realities reveals a hard truth about agentic rewrites: the safety net wasn’t the 64 parallel Claude agents, but a test suite the team spent years building before a single line of Rust existed. If your team is eyeing a similar rewrite because the headline numbers look irresistible, this playbook decodes the mechanics that made it possible and the institutional readiness required to survive it. Table of Contents · The 11-Day Rewrite That Split the Industry f954 · The Real Safety Net Wasn’t the AI — It Was Already Built d682 · Inside the Pipeline: Four Reusable Mechanisms 6e4e ∘ 1. Mechanical port first, idiomatic refactor later. a130 ∘ 2. PORTING.md as a shared translation contract. 30ea ∘ 3. LIFETIMES.tsv as a pre-computed ownership ledger. bc6c ∘ 4 6c4e …