According to an OSChina report, Cloudflare is working with VoidZero and Max Schwenk, an engineer at Owner.com, on tsrs, a Rust port of the TypeScript compiler, incubated inside the Oxc JavaScript compiler toolchain. Early benchmark numbers are striking: configured with the same number of type-checking worker threads, tsrs reaches up to 8x the speed of TypeScript 7.0 while memory use drops by about 70%.
The comparison baseline itself is worth noting: TypeScript 7.0 is the version the project rewrote in Go, which means the 8x gain is pulled out on top of a starting point that is already much faster. In a live test on Owner.com's large repository of 37,000 files, again with four type-checking worker threads enabled, the official Go version needed 61.4 seconds and 36 GiB of memory, while the Rust version needed 8.75 seconds and 6.1 GiB.
tsrs is positioned not as a fork starting a separate line but as a port that follows the upstream TypeScript implementation strictly. Its core goal is Wasm deployment: Rust has no runtime garbage collector and is better suited to being compiled into Wasm, which lets full type-checking capability run in environments sensitive to size and isolation -- edge compute nodes, in-browser IDEs and AI code sandboxes -- and it is already in use on Cloudflare Workers. Some optimisations feed back into the official project: the speed-up in TypeScript 7.1 Beta benefited from this work, and later plans include integrating tsc-rs with full feature support and the LSP protocol.
For cloud and edge infrastructure teams, the significance is this: compute-heavy services such as code checking are turning from something that must run on a developer's machine into a cloud function that can be pushed down anywhere. When AI coding tools need real-time type validation of generated code inside a secure sandbox, a lightweight, GC-free, Wasm-capable compiler is the underlying infrastructure.
Source: OSChina