2026.08.07Bun's Zig→Rust Rewrite in 11 Days: The Loop, Not the 64 Claudes23 min read Bun’s port loop: split the context window A four-stage loop running top to bottom. At the top, the binding spec: PORTING.md and LIFETIMES.tsv, holding the Zig-to-Rust pattern rules and a proposed lifetime for every struct field in the codebase. It binds all four stages below it. Next, one implementer, which sees the Zig source, the spec, and its own reasoning, and writes the port. Its diff — and nothing else — goes to two adversarial reviewers, each instructed to assume the code is wrong; neither sees the implementer's reasoning. Their findings go to one fixer, which applies every finding before the code lands. Sixteen such loops ran per git worktree across four worktrees, roughly sixty-four Claude instances at peak, and the same loop shape drove all three phases: translating 1,448 files, clearing about 16,000 compiler errors, and fixing every failing test. Bun’s port loop: split the context window the reviewer gets the diff and nothing else — never the implementer’s reasoning binds all four diff only findings PORTING.md + LIFETIMES.tsv the binding spec · Zig→Rust patterns, a lifetime per struct field 1 implementer sees the Zig source, the spec, and its own reasoning adversarial reviewer adversarial reviewer 1 fixer applies every finding — only then does the code land sees the diff only · instructed to assume the code is wrong 16 loops per worktree · 4 git worktrees · ~64 Claudes at peak the same loop drove all three phases: translation, compiler errors, failing tests