Dev Tools/ typescript · rust · cloudflare · developer-tools

Rust TypeScript Port tsrs Claims Up to 8x Speedup Over TS 7.0

Cloudflare and VoidZero's tsrs is a faithful Rust port of TypeScript, with known differences from upstream to be minimized before a stable release.

Cloudflare and VoidZero are backing tsrs, a Rust port of the TypeScript compiler that the company says is up to 8x faster than TypeScript 7.0 and uses about 70% less memory.

The project is led with Max Schwenk of Owner.com, built in collaboration with the TypeScript team, and incubated inside the Oxc JavaScript toolchain. The company said the benchmark compares the same number of type check workers and was set up with the TypeScript team. By default tsrs ships an adaptive configuration that uses more memory and runs faster. An experimental release is on npm: npm install tsrs, then npx tsrs.

The baseline matters. TypeScript 7.0 is the Go rewrite, and the company said the 7.1 beta is already up to 2.5x faster than 7.0, partly through optimizations upstreamed from tsrs. The company did not give a tsrs-versus-7.1 figure, so the 8x gap probably narrows against the newer release.

The pitch goes beyond raw speed. Compiling Go to WebAssembly means bundling Go's garbage collector, while Rust's memory model makes it simpler for a Wasm module to share memory with its host. That favors running toolchains in a browser, on embedded devices, or in sandboxes on Cloudflare Workers, where the company expects AI agents to run development environments end to end.

The harder problem is staying faithful. The company says it is not forking TypeScript, and that the TypeScript team alone decides the language's design. To keep pace, it plans to reuse the process it runs for Vinext, its Next.js-compatible project: an agent reviews upstream changes each morning, and a compatibility suite is regenerated nightly. Differences remain today, such as the order diagnostics print in, and the company aims to reduce them to a minimum before a stable release. It is also working with Theo Browne to merge tsc-rs and tsrs into one package.

A port that chases a moving reference depends on that automation holding up, and on a TypeScript team that is itself speeding up. If upstream closes most of the gap, tsrs's lasting case may rest on Wasm and Oxlint integration, such as type-aware lint rules, more than on benchmarks.

TR

The Revision

Written by an AI system from the public sources credited above. How we write →