tsrs: Cloudflare and VoidZero port TypeScript to Rust, claiming up to 8x speed and 70% less memory

Week 433 min read

TL;DR

tsrs is an experimental Rust port of the TypeScript compiler from Cloudflare and VoidZero, built with the TypeScript team rather than as a fork. Cloudflare reports up to 8x faster and about 70% less memory than TypeScript 7.0. The benchmarks are Cloudflare's own.

On this page

tsrs is a Rust port of the TypeScript compiler, announced by Cloudflare and VoidZero. TypeScript is the typed layer on top of JavaScript, and its compiler (tsc) checks your code for type errors. Per Cloudflare's post, tsrs aims to be a faithful port that follows upstream behaviour, and it is built together with the TypeScript team. The speed and memory figures below are Cloudflare's own and have not been independently reproduced.

At a glance
Project
tsrs, a Rust port of the TypeScript compiler
Built by
Cloudflare and VoidZero, with Max Schwenk of Owner.com, in collaboration with the TypeScript team
Home
Incubated in the Oxc JavaScript toolchain
Status
Experimental. Install with npm install tsrs; a WebAssembly build ships as @tsrs/wasm
Licence
Not stated in the announcement
As of
20 Oct 2026

What it does

It type-checks TypeScript the way the official compiler does, written in Rust. Cloudflare says it reports up to 8x faster runs and about 70% less memory than TypeScript 7.0 (the Go-based rewrite of the compiler), with the same number of type-check workers. The post also says TypeScript 7.1 beta is up to 2.5x faster than 7.0, and that some of those gains came from work done in tsrs.

faster than TypeScript 7.0
up to 8x
less memory than TypeScript 7.0
about 70%
TypeScript 7.1 beta vs 7.0, partly from tsrs work
up to 2.5x
Source: Cloudflare blog post on tsrs, Oct 2026

Read the benchmarks with care

Cloudflare says it agreed the configuration with the TypeScript team so both sides run the same setup, and that the benchmarks live in the project's bench directory. It also criticises other ports for benchmarking on larger machines with non-default options. The post says tsrs by default picks a configuration that adapts to machine size, which uses more memory and runs faster. The figures are charts in the post, with no exact numbers in the text.

On the Hacker News thread, some commenters questioned the 8x figure and what it is measured against, and one noted that TypeScript 7.0 already checks large projects quickly. Treat "up to 8x" as a best case on Cloudflare's chosen workloads.

Why Rust, not Go

Commenters on the thread say the aim was a compiler that runs inside Cloudflare's WebAssembly-only sandboxes. Per the post, compiling the Go compiler to WebAssembly means shipping Go's garbage collector with it, while Rust's memory model makes it simpler for the compiled module and its host to share data. Speed was a side benefit in that reading, and at Cloudflare's scale the compute savings matter too.

What is missing

Status per the announcement
  • Done: Type checking from the command line (npx tsrs)
  • Done: WebAssembly build (@tsrs/wasm)
  • Not done: Same diagnostic output order as tsc (known differences)
  • Not done: Language Server Protocol support, which editors use for hints and errors
  • Not done: Content mapper support
  • Not done: Stable release

Cloudflare plans to keep tsrs in sync with upstream TypeScript using an agent-driven process like the one it used for Vinext, to contribute performance fixes back to the TypeScript Go codebase, and to merge the separate tsc-rs project led by Theo Browne into the same package.

Try it

Run it on a TypeScript project
  1. Open a projectAny folder with a tsconfig.json.
  2. Run itnpx tsrs, which fetches the experimental package from npm.
  3. CompareRun tsc on the same project and diff the diagnostics. Output order may differ.

Best for / skip if

Best for

  • teams with large TypeScript codebases or tooling authors who need a compiler that runs in WebAssembly, and anyone willing to test an experimental build against tsc.

Skip if

  • you need editor support, a stable release or identical diagnostics today, or want the speedup confirmed by someone other than the vendor first.

Sources

  1. Cloudflare blog: TypeScript in Rust: what tsrs is, who built it, the benchmark claims, install commands and known gaps
  2. Hacker News discussion: reader reactions, benchmark scepticism and the WebAssembly rationale

Continue reading