Skip to content

Cloudflare and VoidZero port TypeScript to Rust, with the TS team involved

tsrs is a Rust implementation of the TypeScript compiler built alongside the TypeScript team itself, not an independent rewrite. Early benchmarks show it well ahead of TypeScript 7.0.

Cloudflare and VoidZero announced tsrs today, a Rust port of the TypeScript compiler built with Max Schwenk of Owner.com and incubated inside the Oxc JavaScript toolchain. The key detail: this is “in close collaboration with the TypeScript team,” and Cloudflare is explicit that “we are not forking TypeScript.” Language design decisions stay with Microsoft’s team; tsrs aims to track them faithfully.

Cloudflare says tsrs is up to 8x faster and uses around 70% less memory than TypeScript 7.0 with the same number of type-check workers, which already puts it well ahead of TypeScript 7.1 beta’s own claimed 2.5x speedup. You can try it now:

npm install tsrs
npx tsrs

There are still known gaps, including differences in the order diagnostics print, which the team says it wants to close before a stable release. Keeping tsrs in sync with upstream TypeScript relies on an automated process, similar to how Cloudflare already maintains Vinext against Next.js.

Why it matters: tsc’s speed has been a long-standing drag on large TypeScript codebases, and previous Rust rewrites have been independent reimplementations racing to match tsc’s behaviour from the outside. tsrs is different because the TypeScript team is involved directly, which makes it a more credible path to a faster compiler that doesn’t drift from the spec over time.

The caveat: it is pre-stable, with Cloudflare itself flagging behavioural differences from upstream TypeScript that are not yet resolved.

Share

More from The Wire

All briefs