1,009,257 lines of Rust · 6,755 commits · 10 days
6,755 commits · 276 merges · 10 days
Claude Code writes Rust on claude/phase-a-port — ~9s per commit, no compilation, just write and record. 5,439 trunk commits, all timestamped UTC.
May 7 local git worktrees — parallel audit campaigns (unsafe-audit, send-sync, transmute, mem-zeroed, etc.) spun up locally and merged back. 651 commits, all before CI automation existed.
The claude/unsafe-5k campaign: eliminating unsafe blocks across the codebase. Merged into main 27 times on May 12–13. 255 commits.
Dedicated benchmark-repair branch, respawned every time CI flagged a regression. 218 commits across 19 merge cycles.
autofix.ci bot opens numbered branches (ci-auto-fix-53599, etc.) and patches failures. 49 commits — the outer verification loop.
divergence-fix-all, divergence-top5, zig-rust-divergence-audit — branches that caught Zig→Rust behavioral divergences. 47 commits.
flaky-stabilize v1/v2/v3 and fix-hot-h3-flakes. Targeted test instability rather than compile failures. 8 commits.
88 commits from Jarred's Mac (timezone -0700) — architecture, CMake wiring, test pins, and the final merge. Every green dot is a human decision.
◯ Ringed dots are merge commits. Curved arrows show sub-branch tips flowing into the agent main lane — 276 total.
Commits land every nine seconds. Rust compilation takes minutes. The agent writes and commits without compiling.
73% of commits land in under 30 seconds. Nine seconds is roughly the inference time for ~430 output tokens at ~150 tok/s — generation latency, not build latency.
Claude Code generates ~70 lines → git commit. No compilation. Just write and record.
CI catches failures → sub-branches (ci-auto-fix, divergence-fix) repair them → merge back.
Writing is fast. Verification is async.
Gap between consecutive commits across the full PR
The PR was not one agent typing in a straight line — it was a main porting branch with a fleet of specialized sub-agent branches feeding fixes back into it.
Each ×N is the number of times that sub-agent branch merged back into the main port branch — the campaign re-ran until its goal condition was met.
The agent didn't start with CI branches. It ran three distinct verification strategies across the 10 days — each one a response to the scale of what it was building.
Phase-b1 gated each of 96 crates individually — "bun_alloc compiles", "tier-3 — 11/11 crates compile". Phase-b2/d fixed compile errors inline, next commit. A cargo-check daemon ran locally; parallel agent processes read a shared /tmp/cargo-check.log. Fast because cargo check is 10–50× faster than a full build.
Phase-f introduced parallel local worktrees — one per audit campaign: option-ptr-ffi, send-sync-audit, transmute-static, mem-zeroed. Each ran independently and merged back locally. All 651 phase-f commits happened before any CI automation. Still no remote CI branches.
cargo check can't catch link errors, test failures, or platform-specific bugs. Once the full binary was being built by CI, failures appeared that needed async repair. autofix.ci started spawning numbered branches automatically; bench-until-green, flaky-stabilize, and divergence-fix ran as their own parallel campaigns.
Where the 6,755 commits actually went
May 04–05. The initial bulk-drafting phase, where the AI generated large translation batches — 12 to 90 files per commit — before the structured sequential phases began. The runway, before the engineering plan formalized.
Wrapping Zig types behind Rust gates and verifying correctness one tier at a time before opening the floodgates.
Intermediate sweeps that tidy the tree between the heavy structural phases.
The mechanical Zig→Rust translation of bun_runtime, the bundler, unsafe blocks, and TODO items. The single largest phase.
Giving Rust ownership of resources that Zig managed by hand — translating manual lifecycles into RAII patterns.
A second cleanup wave after RAII conversion settles the ownership model.
Collecting and cataloging remaining work — building the to-do list for the final phase.
Systematic wrapping of the 14,000+ remaining unsafe sites — the long tail of memory-safety work that a Rust rewrite is supposed to be about.
What makes this rewrite remarkable is what happened before a single line of Rust was written.
Commit message: phase-b0: add crate DAG analyzer
Before touching a single source file, the agent wrote a 175-line TypeScript program that maps the entire codebase: 96 crates, their intended dependency tiers (T0 zero-dep primitives through T6 subsystems), and which imports create cycles. You cannot safely extract a monolith into a multi-crate Cargo workspace without knowing the dependency graph first.
Six steps, executed in order, all visible in the commit history.
Each phase-b1 commit is exactly one crate reaching green — gaps proportional to crate complexity:
| Time (UTC) | Commit | Gap |
|---|---|---|
| 04:09:11 | scaffold Cargo workspace (96 crates) | — |
| 04:10:21 | prune back-edge deps from Cargo.toml | +70s |
| 04:14:12 | bun_alloc compiles | +231s |
| 04:17:40 | bun_core compiles | +208s |
| 04:18:14 | windows_sys compiles | +34s |
| 04:19:35 | collections compiles | +81s |
| 04:20:37 | unicode compiles | +62s |
| 04:22:26 | base64 + platform compile | +109s |
| 04:25:30 | errno compiles | +184s |
| 04:26:39 | uws_sys + 5 *_sys compile | +69s |
| 04:27:48 | ptr + safety compile | +69s |
| 04:30:09 | paths + string compile | +141s |
| 04:31:01 | sys compiles | +52s |
231 seconds for bun_alloc (foundational allocator, most complex), 34 seconds for windows_sys (small, mostly declarations) — gaps are irregular and proportional to crate complexity. The natural cadence of a compile→fix→recompile loop.
PR #30412 is a checkpoint, not a finish line. The original Zig stays in the repo as a reference layer while the port continues.
58% of native source. The Rust build owns the binary; Zig no longer compiles.
42% of native source. Not compiled, not shipped. Kept as semantic source-of-truth while porting continues.
Zig files with no .rs sibling yet. The remaining porting queue.
| File | Subsystem | Zig LOC |
|---|---|---|
| js_printer.zig | JS code printer | 6,422 |
| shell.zig | Shell interpreter | 4,706 |
| sys.zig | OS syscall layer | 4,703 |
| resolver.zig | Module resolver | 4,388 |
| sys/windows/windows.zig | Windows platform | 4,108 |
| server.zig | HTTP server | 3,855 |
The migration did not stop when the PR merged. port-batch.ts is the next agent's instruction set.
10 days, structured into clear phases.
May 04 – May 14, 2026 · n = 6,755
| Date | What happened |
|---|---|
| May 04 | Phase A — initial AI draft batches. 20 commits, 12–90 files each. Work begins. |
| May 05 | Phase B2 — verify gates, tier sweeps, cycle fixes. 74 commits. |
| May 06 | PEAK — Phase E bulk porting of runtime modules. 2,906 commits. |
| May 07 | Phase F/G — merge campaigns, builder daemon, cleanup. 1,568 commits. |
| May 08 | Phase D — seam removal (Zig→Rust bridge layers). Jarred wires CMake build. First CI auto-fix branches. 750 commits. |
| May 09 | Phase H — Windows-specific porting. 250 commits. |
| May 10 | Slow day — Jarred's architectural decisions, test stabilization. 41 commits. |
| May 11 | Safety — noalias, unsafe reduction, CI flake fixes. 284 commits. |
| May 12 | Perf — unsafe-5k campaign (×27 merges), benchmark loop (bench-until-green ×19). 675 commits. |
| May 13 | Tests + docs — flaky stabilization, cleanup, remove internal porting notes. 176 commits. |
| May 14 | Final build fixes, merge to main. 11 commits. |
Click a day to switch. Each cell is one 5-minute bucket; darker = more commits. Hover for details.
Every git commit object encodes the author's timezone offset. In a 6,755-commit history, that single field shows exactly who was at the keyboard.
Claude Code's automated harness runs in UTC. There is no local timezone because there is no human at a machine — just an agent loop with a system clock.
Jarred Sumner, committing directly from his Mac. Pacific time — consistent with every other commit he has ever made in this repository.
Jarred's entire pre-PR commit history on oven-sh/bun is overwhelmingly -0700 or -0800. The PR's 6,667 commits are +0000 — the fingerprint of an automated, timezone-agnostic environment. The 88 -0700 commits are the moments where Jarred reached in directly: build wiring, architectural decisions, and reverts.