The Rust Rewrite of TypeScript Isn't About Speed. It's About Memory.

Everyone is framing tsrs — the Rust port of the TypeScript compiler that Cloudflare and VoidZero just took over — as another compiler-rewrite story, and that misses the point. The rewrite was never really about making humans wait less for red squiggles. It was about making validation cheap enough that AI coding agents can run it thousands of times a day without eating a machine alive. That's a different problem, and the fix looks different.

The numbers from Owner.com, where the port started, make this concrete. Their backend monolith has roughly 37,000 TypeScript files checked as a single program. One pass with TypeScript 7.0 needed 19 gigabytes of memory and about 80 seconds. Stack the linter, the language server, and a dev server on top of that and validation alone climbs past 50 gigabytes — more than fits on a 36-gigabyte laptop. Head of AI DX Max Schwenk wrote that engineers couldn't run several coding agents in parallel without risking the machine locking up. The attempted workarounds are a who's who of operational pain: cloud sandboxes sized by guesswork (overpay for peak usage or accept out-of-memory crashes), politely asking agents in steering files to take turns with the checker (agents don't read the room), and splitting tsconfigs into slow and fast variants, which is a band-aid with a configuration file for a name.

Source article image
Source image 1

The port itself was written largely by coding agents, which is the part that makes the industry nervous, and it cut their typecheck from 80 seconds to single digits. Cloudflare's own benchmarks claim up to 8x faster and roughly 70% less memory than TypeScript 7.0 at equal worker counts, running inside Workers via WebAssembly. Both parties insist — loudly, repeatedly — that this is not a fork. The TypeScript team keeps full control of the language's design, tsrs stays incubated inside the Oxc toolchain, and some of the tricks the port uncovered have already been upstreamed: the TypeScript 7.1 beta picked up pieces of tsrs and is itself about 2.5x faster than 7.0. The compiler race is quietly improving Microsoft's compiler rather than replacing it.

Source article image
Source image 2

Still, the tension is real and worth naming. If a third-party implementation gets written by agents against the reference behavior, conformance drift is only a matter of time unless someone keeps feeding test suites and reviewer attention into it — and the people best positioned to notice drift are the same agents generating the code. Every team running a large TypeScript monolith is now holding a tradeoff: adopt an agent-built compiler port that fits your validation budget today, or wait for the official one to catch up at the speed of committee. If your CI agents are already checking code faster than humans can review it, which side of that tradeoff would you bet on?

Sources

Comments

Popular posts from this blog

AI Is Starting to Feel Less Like a Gadget and More Like Infrastructure

When Two AI Bots Finally Learned to Talk in Discord

Enterprise AI Is Quietly Becoming a Systems Integration Problem