Technology
Cloudflare's AI-Powered Rust TypeScript Port Achieves 5-8x Faster Type Checking
A new Rust-based TypeScript compiler, generated with AI assistance, delivers significant performance gains and WebAssembly support while avoiding direct competition with the official language.
1/2
InfoQ
Cloudflare has introduced tsrs, an experimental Rust implementation of the TypeScript compiler, developed in partnership with VoidZero and Max Schwenk. Rather than a fork, the project operates as a complementary tool within the Oxc toolchain, with TypeScript's core team maintaining complete authority over the language.
Performance and Technical Improvements#
The most striking claim is dramatic speed and memory gains—up to 8x faster type checking with approximately 70% less memory consumption compared to TypeScript 7.0 when running the same number of checker workers. Real-world validation tells a more nuanced story: one developer measured 5.3x faster checking and 72% memory reduction, while testing against the newer TypeScript 7.1 beta revealed more modest 2.7x improvements. The gap underscores that the headline 8x figure is anchored to an older baseline.
Beyond raw speed, Rust's architecture unlocks WebAssembly compilation via @tsrs/wasm, allowing type checks to run directly in browsers or on Cloudflare Workers without the overhead of a garbage-collected runtime.
How It Was Built#
Schwenk, writing in a detailed account, notes he authored virtually no code himself—instead, Claude Opus agents automated the port using TypeScript's 15,197 conformance test cases as a specification. On Owner's 37,000-file codebase, a type check that consumed 19 GiB and took 80 seconds with TypeScript 7.0 dropped to just 7 seconds.
Ecosystem Context and Caveats#
The release remains experimental. Notable missing features include watch mode, language server support, and some CLI options like --init and --showConfig. Diagnostic ordering can also differ, and compatibility notes outline further limitations. Early adopters also spotted a subtle hazard: tsrs exits with code 2 on type errors (versus tsc's code 1), potentially silencing CI pipeline failures unnoticed.

