Cloudflare is taking control of tsrs, a Rust-based version of Microsoft's TypeScript compiler that delivers speeds up to eight times faster and consumes 70% less memory compared to TypeScript 7.0, according to a blog post published this week. The cloud infrastructure company's director of engineering, Christoph Nakazawa, emphasized on X that this isn't a competing fork—Cloudflare is collaborating with Microsoft's TypeScript team, and optimizations discovered during the Rust port have already made TypeScript 7.1 roughly 2.5 times faster than its predecessor. The effort comes as companies race to support AI coding agents that need to validate their work without overwhelming available computing resources.

The tsrs project actually originated last month at restaurant software firm Owner.com, where head of AI developer experience Max Schwenk confronted a 37,000-file TypeScript backend. Microsoft's Go-based compiler required 19 GiB of memory and took 80 seconds for a single-threaded check, making it difficult to run multiple coding agents concurrently. Schwenk turned to Anthropic's Claude Opus 5.5 to rebuild the compiler in Rust, writing zero lines of code himself and instead deploying more than 20 AI subagents in parallel. The experiment produced a working typechecker overnight, and further refinements brought Owner.com's typechecking time down to roughly seven seconds in continuous integration. Across more than a dozen public projects, tsrs ran 2.5 to five times faster than Microsoft's Go compiler nightly builds while using approximately one-third the memory.

Cloudflare engineers Boshen Chen and Dimitri Mitropoulos, co-authors of the blog post alongside Nakazawa, made clear the company has no intention of steering TypeScript's future. "We believe the TypeScript team should remain in full control of the language's design and direction," they wrote. Daniel Rosenwasser, Microsoft's principal product manager for TypeScript, commented in a Hacker News discussion that "a lot of the speed does not just come down to language choice," noting that "some of what is going to make TS 7.1 faster and leaner… actually comes from optimizations discovered in tsrs." Rosenwasser announced the TypeScript 7.1 beta separately, highlighting substantial speed and memory improvements.

Cloudflare sees particular value in Rust's compatibility with WebAssembly, which offers more direct memory control than Go's garbage-collection approach when compiling to Wasm. That could enable complete development environments to run inside browsers and isolated Workers sandboxes, where AI agents can write, check, and build applications without resource constraints. The move fits into Cloudflare's expanding JavaScript ecosystem, which includes its June acquisition of VoidZero and the recent launch of Void, an open-source platform for deploying AI-built applications. The Cloudflare and VoidZero teams are now developing tsrs as part of Oxc, VoidZero's Rust-based JavaScript toolchain, with plans to weave it into additional developer tools.

Maintaining compatibility between tsrs and Microsoft's implementation presents an ongoing challenge, particularly for a compiler rebuilt entirely by AI agents. Schwenk says the project uses TypeScript's conformance tests, deliberately introduces errors into real projects, and runs Miri, a tool for detecting memory-safety problems in Rust—checks that have already uncovered a memory bug appearing only in optimized builds. "A faster compiler that finds fewer errors is a broken compiler with good marketing," Schwenk wrote. Cloudflare plans to apply the same AI-assisted monitoring approach it used for Vinext, its Vite-based reimplementation of the Next.js web framework, where agents watch for upstream changes, run compatibility tests, and propose fixes when discrepancies emerge. Some differences remain in tsrs, including the order diagnostic messages appear, but the Cloudflare authors pledged to "take extreme care that we don't introduce diverging behaviors from upstream TypeScript." The arrangement suggests a new model for open-source collaboration: one company accelerating a Microsoft tool through an independent implementation while feeding optimizations back upstream, all powered by AI agents that can rewrite entire compilers overnight. Whether this collaborative-but-competitive dynamic scales beyond compilers remains an open question, particularly as more firms discover that AI-assisted rewrites can deliver performance gains traditional refactoring couldn't match.