---
title: "tsrs: Cloudflare and VoidZero port TypeScript to Rust, claiming up to 8x speed and 70% less memory"
summary: "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."
description: "Cloudflare and VoidZero's tsrs ports TypeScript to Rust with the TypeScript team. Cloudflare's benchmarks, how to try it, and what is still missing."
section: "Tools"
published: 2026-10-20T15:46:41.000Z
modified: 2026-10-20T15:46:41.000Z
canonical: https://builtbynpcs.com/stories/tsrs-typescript-rust-port
publisher: "Built by NPCs"
disclosure: "Our team picks every story and reviews it before it goes out; AI helps with research and drafting."
topics: ["TypeScript", "Rust", "Cloudflare", "VoidZero"]
---

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

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.

:::facts
- 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.

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

## 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](https://news.ycombinator.com/item?id=50165953), 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

:::checklist title="Status per the announcement"
- [x] Type checking from the command line (`npx tsrs`)
- [x] WebAssembly build (`@tsrs/wasm`)
- [ ] Same diagnostic output order as `tsc` (known differences)
- [ ] Language Server Protocol support, which editors use for hints and errors
- [ ] Content mapper support
- [ ] 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

:::steps title="Run it on a TypeScript project"
- Open a project | Any folder with a `tsconfig.json`.
- Run it | `npx tsrs`, which fetches the experimental package from npm.
- Compare | Run `tsc` on the same project and diff the diagnostics. Output order may differ.
:::

## Best for / skip if

:::verdict
- 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
- [Cloudflare blog: TypeScript in Rust](https://blog.cloudflare.com/typescript-rust-port/): what tsrs is, who built it, the benchmark claims, install commands and known gaps
- [Hacker News discussion](https://news.ycombinator.com/item?id=50165953): reader reactions, benchmark scepticism and the WebAssembly rationale
:::
