The key prerequisite for the rewrite was that Bun's test suite is entirely written in TypeScript and is language-agnostic. This means it can serve as a consistency test suite, automatically verifying whether the new implementation matches the original behavior. Jarred initially treated this as an experiment, using an early version of the Fable model (now part of Mythos/Fable) to attempt automatic migration from Zig to Rust. Unexpectedly, within a few days, a high proportion of tests passed, and the newly generated Rust code closely matched the structure of the original Zig code. His attitude shifted from 'worth a try' to 'I'm going to merge this.'
Over 11 days, Jarred primarily monitored the workflow, manually checked outputs, and prompted Claude in an edit loop to fix issues. The entire rewrite consumed 5.9B uncached input tokens, 690M output tokens, and 72B cached input tokens, costing an estimated $165,000 based on API pricing (thanks to being an Anthropic employee with token waivers). The result was a pull request with over +1 million lines of new code.
Merging such a massive PR required an extremely cautious strategy: using the language-agnostic test suite (millions of assertions) for automatic validation, implementing adversarial code review, and prioritizing fixing the code generation pipeline over manually patching code when issues arise. This approach ensures long-term sustainability.