Coderefercoderefer
CoursesWebinarsBlogAbout
Coderefercoderefer

Discover. Learn. Automate. Grow.

Learn

  • Courses
  • Webinars
  • Blog
  • Search

Company

  • About
  • Contact
  • FAQ

Legal

  • Privacy Policy
  • Terms of Service
  • Refund Policy
© 2026 Coderefer. All rights reserved.
HomeBlogtsrs Explained: The Rust TypeScript Compiler, 8x Faster
ai-toolsOctober 21, 202610 min read

tsrs Explained: The Rust TypeScript Compiler, 8x Faster

tsrs is Cloudflare and VoidZero's Rust port of the TypeScript compiler: up to 8x faster, 70% less memory than TS 7.0. Here's the real story and how to try it.

V

Vamsi Tallapudi

Manager, Architect Technology at Cognizant

tsrs Explained: The Rust TypeScript Compiler, 8x Faster

tsrs is a Rust rewrite of the TypeScript compiler, built by Cloudflare and VoidZero with Max Schwenk of Owner.com, and it's up to 8x faster than TypeScript 7.0 while using about 70% less memory. It's not a fork. It tracks Microsoft's TypeScript compiler function-by-function and is being folded into the Oxc toolchain. You can install it today with npm install tsrs.

If that sounds confusing because you thought TypeScript already got its speed boost this year, you're not wrong. Stick with me, because this gets weirder the deeper you go.

What exactly is tsrs?

tsrs is a Rust implementation of tsc, announced by Cloudflare and VoidZero on October 20, 2026 in a joint blog post. The announcement tweet from VoidZero lays out the pitch in four bullets: not a fork, built in close collaboration with the TypeScript team, up to 8x faster than TS 7.0 with ~70% less memory, and it runs in WebAssembly so it works in browsers and on Cloudflare Workers.

A few things worth knowing up front:

  • It's a faithful, function-by-function port of the Go implementation (tsgo), not a redesign
  • Diagnostic text, exit codes, and error messages that differ from real tsc are treated as bugs
  • It's being incubated inside Oxc, the Rust-based JS/TS toolchain that already powers a chunk of the Vite ecosystem
  • Install it with npm install --save-dev tsrs and run npx tsrs -p . --noEmit

Wait, didn't TypeScript already ship a faster compiler?

Yes. TypeScript 7.0, the native Go port Microsoft spent most of 2025 building, hit general availability on July 8, 2026. It delivered 8x to 12x speedups over the old JavaScript-based TS 6 compiler: checking VS Code's own codebase dropped from 125.7 seconds to about 10.6 seconds.

So tsrs isn't competing with the old slow compiler. It's claiming another 8x on top of the thing that was already 10x faster than what came before it. That's the part that made people's eyebrows go up on Hacker News.

The Rust angle isn't really about raw speed over Go, though: tsgo is already plenty fast on the CPU. It's about WebAssembly. Go's garbage collector has to ship inside every WASM binary, which makes the builds heavier and slower to spin up. Rust has no GC, so a WASM guest can talk to its host with clean, direct memory access. That's why @tsrs/wasm can run type-checking inside a browser tab or a Cloudflare Worker in a way tsgo-in-WASM never could comfortably do.

Where did this actually come from?

This is the part the headlines undersell. tsrs started as an internal fix at Owner.com, a restaurant SaaS company, not a Cloudflare research project.

Owner's backend monolith (they call it Olympus) is about 37,000 TypeScript files checked as a single program. On TypeScript 7.0, that took 80 seconds and 19 GB of memory single-threaded. Add a linter running alongside it and memory usage doubled past 50 GB, which pushed engineers out of their laptops and into cloud sandboxes just to get a type-check to finish.

Max Schwenk, Owner's head of AI developer experience, had previously worked on TypeScript's Go port at another company. Instead of hand-porting tsgo to Rust himself, he prompted Claude Opus 5.5 to do it, using TypeScript's 15,197 conformance tests as the spec and running 20-plus subagents in parallel across separate git worktrees, one Rust crate per Go package. The timeline is almost comically fast: concept exploration on September 30, a working typechecker matching 78% of baseline behavior by October 1, then an overnight push to 99.97% compatibility. A later optimization pass got Olympus's check time down to 7 seconds, from 80.

By mid-October, the project had moved into Oxc's hands, with Cloudflare and VoidZero backing it publicly on October 20.

How fast is tsrs, really?

"8x faster" is doing a lot of work in that headline, and speedup numbers always need a baseline. Developer Flavio Copes ran his own benchmarks comparing TypeScript 7.0 against tsrs at matched checker counts, and the gap is real but it moves around a lot depending on the project:

ProjectTypeScript 7.0tsrsCheckers
VS Code10.94s2.21s4
Supabase Studio7.24s1.31s4
Webpack1.46s0.29s4

That's roughly a 5x gap at 4 checkers, not 8x, but tsrs also defaults to 16 checkers on a 16-vCPU machine where the Go version caps at 4, and the 8x figure in Cloudflare's post is measured at equal checker counts on larger codebases, closer to Owner's 37,000-file case than to VS Code. Translation: the real-world number depends heavily on your hardware and how you configure --checkers. Don't take any single multiplier as gospel until you've run it on your own repo.

The TypeScript team isn't just watching from the sidelines, either. Microsoft's Daniel Rosenwasser confirmed the teams are collaborating, and pointed out that "a lot of the speed does not just come down to language choice": several of tsrs's algorithmic tricks and allocation patterns are already landing in the TypeScript 7.1 beta, which is reportedly about 2.5x faster than 7.0 on its own, no Rust required.

What happened to Theo Browne's rival Rust port?

Here's where it gets genuinely strange. Theo Browne had already been building his own AI-generated Rust port, called tsc-rs (or ts-rust), weeks before tsrs went public.

Theo's story is wild on its own. An early attempt using other AI models burned through more than $400,000 in API spend without reaching usable compatibility. He then switched to Claude Opus 5.5, which got a working version running in about ten hours and a finished port in two weeks for roughly $24,000. Theo added a "Slop Line" to the README (a literal marker separating human-written content from AI-generated code) and admitted he's never read a line of the generated Rust himself. The port passes all 181,711 conformance tests carried over from TypeScript's own test suite and matched real-world diagnostics on projects like TanStack Query and Hono. His numbers: about 1.61x faster than tsc 7 on average, 2.22x on his own project.

When tsrs landed with better benchmarks, Theo didn't dig in for a turf war. He joked that his own --fast mode might have delayed the launch, then conceded: "it looks like tsrs is the real winner." Cloudflare is now working with him directly to merge tsc-rs's language server and content-mapper work into tsrs rather than running two competing ports forever. Good outcome, honestly. Nobody needed three incompatible AI-written TypeScript compilers floating around npm.

How do you actually try tsrs today?

It's an npm package, so there's no special setup beyond installing it:

npm install --save-dev tsrs
npx tsrs -p . --noEmit

Useful flags once you're past the basic check:

  • --outDir dist --declaration: emit JS and .d.ts files
  • --watch: keep checking on file changes
  • --incremental: reuse build info between runs
  • --checkers N: set worker thread count manually
  • --singleThreaded: for comparing against tsgo's default behavior
  • --maxMemory 2G: cap memory on constrained machines

For browser or Workers use, there's a separate @tsrs/wasm package with an in-memory virtual filesystem:

import { tsc } from '@tsrs/wasm'
const result = await tsc(['-p', '/project'], {
  files: { '/project/app.ts': sourceCode }
})

There's also a language server you can wire into an editor manually via tsrs --lsp -stdio, though it doesn't auto-replace your existing TypeScript server: you have to point your editor at it yourself.

What's the catch?

A few, and they matter if you're thinking about dropping this into CI tomorrow:

  • The WASM build is single-threaded and capped at 4 GiB of linear memory, which is a hard WASM limit, not a tsrs choice
  • No incremental caching across separate WASM API calls, no watch mode, and no language server support in the browser build yet
  • --init and --showConfig aren't implemented
  • Framework tooling for Vue, Astro, and Svelte files still needs separate validation: it's not guaranteed equivalent to tsgo's coverage yet
  • One Hacker News commenter flagged what they called unsound unsafe code inside the arena allocator, arguing it hides unsafety rather than removing it. That's a real concern for a compiler people are about to trust with production builds, and it hasn't been publicly resolved as far as I can tell

Should you actually switch to tsrs now?

Not yet, and I say that as someone who wants this to work. Run it as a second CI job next to your real tsc or tsgo check, compare the outputs on your actual codebase, and verify your .d.ts output if you ship a library. Don't swap your main build pipeline over to a project that's a few weeks old and partly AI-generated code nobody at Cloudflare has fully audited yet.

The bigger story here isn't the benchmark numbers, though. It's that a 1.5-million-line compiler got ported to a different language by AI agents, in days, by someone who never read the output (twice, by two different teams, at the same time). One attempt cost $24,000 and worked. An earlier one cost $400,000 and didn't. That gap alone tells you how unpredictable this kind of work still is. The TypeScript team ending up collaborating with both forks, rather than treating them as a threat, is the sane response. Whether the rest of the open-source ecosystem handles AI-generated rival forks this gracefully next time is a different question.

FAQ

Is tsrs a fork of TypeScript?

No. The team behind it explicitly says it isn't a fork: tsrs tracks Microsoft's TypeScript compiler function-by-function and treats any behavioral difference as a bug to fix, not a feature to keep.

How much faster is tsrs than TypeScript 7.0?

Cloudflare and VoidZero claim up to 8x faster checking with about 70% less memory at equal checker counts. Independent benchmarks from Flavio Copes show roughly 5x on projects like VS Code and Supabase Studio at 4 checkers each, with the gap widening on larger codebases and higher checker counts.

Who built tsrs?

Max Schwenk, head of AI developer experience at Owner.com, built the original port using Claude Opus 5.5 agents in early October 2026 to fix a 37,000-file monolith that took 80 seconds and 19 GB of memory to type-check. Cloudflare and VoidZero adopted it and are incubating it inside the Oxc toolchain.

Is tsrs the same as Theo Browne's tsc-rs?

No, they started as separate AI-generated Rust ports built around the same time. Theo conceded tsrs had better performance after it launched, and Cloudflare is now working with him to merge tsc-rs's language server features into the tsrs project instead of maintaining two ports.

Can I use tsrs in the browser?

Yes, via the @tsrs/wasm package, which runs type-checking against an in-memory virtual filesystem. It's currently single-threaded with a 4 GiB memory cap (a WebAssembly limit) and doesn't support watch mode or incremental caching across calls yet.

Does tsrs replace TypeScript 7.0?

Not for most teams right now. It's an experimental, partly AI-generated project a few weeks old. The TypeScript team is already pulling tsrs's optimizations back into TypeScript 7.1 directly, so some of the speedup is coming to the official compiler anyway without you needing to switch tools.

How do I install and run tsrs?

Run npm install --save-dev tsrs then npx tsrs -p . --noEmit to type-check without emitting output. Add --watch, --incremental, or --checkers N depending on your workflow.

Watch

Theo Browne on building tsc-rs: porting TypeScript to Rust for $420k in AI tokens

If you want the full backstory on the AI model doing the heavy lifting here, we covered Claude Opus 5.5's launch and broke down its pricing and real-world coding performance separately. And if the idea of trusting code nobody read line-by-line makes you nervous, our piece on reverse-engineering Claude Code is a good next read.

ai-tools typescript rust cloudflare 2026

Comments

    Get AI tricks that save you hours every week

    New AI tools, automation workflows, and course drops — straight to your inbox. Join 2,400+ builders.

    Read Next

    Mistral Voxtral 3 Explained: Voice Agent SDK, Pricing, and Tool Calling
    ai-tools

    Mistral Voxtral 3 Explained: Voice Agent SDK, Pricing, and Tool Calling

    Mistral's Voxtral 3 adds a LiveKit-based voice agent SDK with tool calling, starting at $0.04 a minute, plus new speech-to-text and TTS models.

    October 21, 20268 min read
    DeepSeek DeepInfer Explained: The Engine Behind Its API
    ai-tools

    DeepSeek DeepInfer Explained: The Engine Behind Its API

    DeepSeek open-sourced DeepInfer, the Apache 2.0 engine behind its API. Here's what it needs, what's missing, and who should actually run it.

    October 21, 20267 min read
    Mistral Timestral Tutorial: Zero-Shot Forecasting on a CPU in Python
    ai-tools

    Mistral Timestral Tutorial: Zero-Shot Forecasting on a CPU in Python

    Mistral's Timestral forecasts time series on a CPU in 10-140ms, no GPU. How to install and run it in Python (5M-209M models), plus the license's $20M catch.

    October 20, 20267 min read
    View all posts →