Contents
In brief
In 2000 Joel Spolsky called a from-scratch rewrite the worst strategic mistake a software company can make. A Dev.to essay uses Bun's Zig-to-Rust core port — about 535k lines in 11 days, driven by dozens of Claude agents — to argue that the rule was a frozen cost estimate, not a law of nature. It does not tell you to rewrite production tonight.
What happened
Jarred Sumner wanted fewer memory leaks and use-after-free bugs, so he moved the runtime core to Rust, where the compiler enforces part of the safety story. Then he pointed agents at the repo: up to 50 automated workflows, four Git worktrees in parallel at peak, 16 Claude agents per tree. They burned down more than 16,000 compiler errors on their own.
The essay's numbers: 535,496 lines of Zig, more than a million lines of Rust, 6,778 commits, roughly 6.6 billion tokens and about $165k in API spend. Peak parallelism: 64 agents. Calendar: 11 days. The comparison is Turborepo — three to five engineers and 14 months for Go to Rust.
Bun 1.4.0 looks both impressive and messy. A 2,000-parallel-build benchmark dropped memory from 6.7 GB to 609 MB, 128 old bugs were fixed, Linux and Windows binaries shrank about 20%, HTTP throughput rose 2–5%. Nineteen known issues arrived with the port, about 4% of the code is still unsafe, and Zig's Andrew Kelley called the effort unreviewed slop. The author asks you not to dismiss that: a million lines nobody carefully read is a risk even when the benches are green.
Why it matters
Spolsky's rule held because humans had to re-derive edge cases already encoded in old patches, while the product shipped nothing for a year. When the cost curve breaks, the advice stops being universal. That is not a license to always rewrite; it is a reason to recompute the dogma the same way you recompute dependencies.
Three claims can be true at once. Spolsky is right for his cost model. Kelley is right about review debt. Bun is right that the build shipped and got lighter on some loads. The interesting part is the tension, not a winner.
In practice
- Before you say “we never rewrite,” write down the cost and calendar that made “never” true five years ago — and what changed in the toolchain.
- Do not compare an agent port to a year of human work without one scoreboard: money, calendar, known defects, share of unreviewed code.
- Budget review separately from generation: $165k of API spend does not buy a careful read of a million lines.
- Keep the old path alive until the new one passes the scenarios that protected production for years.
- If the goal is memory safety, count
unsafeand the runtime regression tests, not only “we moved to Rust.”
Takeaway
The lesson is not “always rewrite from scratch.” It is that engineering taboos often hide stale arithmetic. When the arithmetic changes, revisit the taboo instead of reciting it. The question is not whether a model can port code. It is whether the reason you refused still holds.

