- Jarred Sumner said the Bun team chose to make JavaScript faster instead of rewriting Claude Code in Rust, because porting the tests would erode trust in them.
- These are Sumner's own figures, about 4x less memory and 2x faster starts; the excerpts do not say how they were measured.
When software is too slow or too heavy, a rewrite in a faster language is not the only fix. Jarred Sumner, creator of Bun, argued on the AI Engineer show that speeding up the runtime can be the cheaper route. His reason: the tests you already have stay valid.
What was said
Sumner said his team discussed rewriting Claude Code in Rust. They had the skills, he said, because the Bun team had just done the same to Bun. They decided against it for Claude Code.
The difference was the tests. Bun's tests are written in TypeScript, a language independent of the one Bun is built in. So the team could run the same tests against the old version and the new one. Claude Code's tests are also in TypeScript, so a Rust version would mean porting the whole suite.
That, Sumner said, was the problem: "as soon as you're rewriting the tests, then you can't really trust the tests anymore." He judged the rewrite too risky.
The team instead made JavaScript itself faster. He gave a performance reason too. Translating code while a program runs uses processor time, and every Claude Code session would pay that cost. He said this bites hardest on clients such as the iOS app. An ahead-of-time compiler does the translation before the code runs. Because TypeScript types need not be correct, he said, the compiler treats them as predictions, not facts.
Sumner put the gains at about four times less memory and about twice as fast a start. He said the team is using the compiled version internally and that it will be available externally soon. The excerpts do not say how the figures were measured.
Because the project is checked against suites that existed before it, he added, "we can largely trust that the tests that predate the project work."
Why it matters
Our reading: the price of legacy is not only the old code. It is also the proof that the old code works, which a rewrite can quietly throw away.
For anyone weighing a port, Sumner's example suggests extra questions. Do our tests describe behaviour in a way that survives a change of language? If not, a rewrite means rebuilding trust as well as code. Can the platform underneath be improved instead, leaving the tests untouched?
That changes the budget comparison. A rewrite looks cheap if you count only the new code. It looks different once you count re-earning confidence in every test.
The other side
No Rust version of Claude Code was built, so the two routes were never compared head to head. This is Sumner's argument from one case, and the faster runtime is not yet public.
His case is also unusual. His team builds a runtime and, in his words, is "pretty good at rewrites". Most companies do not own the platform under their software. Building a compiler is no small job: the show notes say the change ran to millions of lines of code and was redone five times within a month.
He also said the work is unfinished, because threads have not yet been added to the compiled version. And he did not say rewrites are wrong. Bun was an easy rewrite because its tests could travel between languages. The lesson is narrower than "never rewrite": tests tied to the old code make a rewrite costly.
Written by the WebPulse Newsroom with AI assistance, and checked by our editorial review: every quotation was verified against the recording's transcript. How we use AI.
The conversation this talking point comes from
- AI Engineer: How to Ship Millions of Lines of Agent-Written Code — Jarred Sumner, Anthropic (2026-11-24)





