Cloudflare and VoidZero Introduce tsrs: An AI-Generated Rust Port of TypeScript
Cloudflare, VoidZero and Max Schwenk announced tsrs, an experimental Rust port of the TypeScript compiler, built with the TypeScript team's involvement. Cloudflare claims up to 8x faster checking and 70% less memory than TypeScript 7.0, though one test against 7.1 beta showed 2.7x. It lacks watch mode and a language…

tsrs, a Rust port of the TypeScript compiler, has been announced by Cloudflare, which is developing it with VoidZero and Max Schwenk of Owner.com, incubating the project inside the Oxc toolchain and working in close collaboration with the TypeScript team. Cloudflare is emphatic that this is not a fork, with the TypeScript team retaining full control over the language's design.

Cloudflare's benchmark comparing tsrs against TypeScript 7.0 at the same number of checker workers
The headline numbers are a claimed up to 8x faster type checking and around 70% less memory than TypeScript 7.0 at the same number of checker workers. Rust also unlocks the use case of compiling to WebAssembly through @tsrs/wasm so checks can run in a browser or on Workers, without dragging a garbage collector into the bundle the way a Go binary does.
To try, developers simply point it at an existing tsconfig and run:
npm install -D tsrs
npx tsrs -p . --noEmit
In a detailed write-up, Schwenk explains he wrote "zero" code, instead directing agents led by Claude Opus 5.5 to produce a faithful port, using TypeScript's own 15,197 conformance cases as the spec. On Owner's 37,000-file monolith, a check that needed 19 GiB and 80 seconds on TypeScript 7.0 dropped to 7 seconds.
One developer benchmarked both npm packages and measured 5.3x faster checking and 72% less memory, with identical diagnostics and byte-identical emit, but spotted that tsrs exits with code 2 on type errors where tsc exits 1, enough to quietly break a CI script. Measuring against the newer TypeScript 7.1 beta rather than 7.0, ImportStatic found a smaller 2.7x gain, a reminder that the 8x headline is measured against the older baseline.
TypeScript's Daniel Rosenwasser responded that much of the speed "does not just come down to language choice," and that some optimisations discovered in tsrs are feeding into a leaner TypeScript 7.1. Peter Steinberger reported on X:
Moved to tsrs over the weekend. Drop-in replacement. Around 5x faster for OC.
Kind of amazing that it took Microsoft a team and two years to rewrite the TS compiler in go, and now you can just let an agent rip and get sth significantly better within weeks.
Others were wary, questioning whether the arena-based, never-freed memory model is sound.
tsrs sits alongside Microsoft's own Go-based compiler, known as tsgo, and Theo Browne's rival Rust port,
tsc-rs
. Rather than compete, Cloudflare is merging tsc-rs and tsrs into a single package, adding language server and content mapper support.
The release remains experimental. There is no watch mode or language server yet,
--init
and
--showConfig
are unsupported, and diagnostic order can differ, the compatibility notes provide more details. Because tsrs tracks TypeScript 7, teams still on TypeScript 5 or 6 should first adopt Microsoft's native Go port before swapping in tsrs, after which migrating is as simple as reusing the existing tsconfig.
tsrs is open source under Apache-2.0 and available on GitHub.
Originally published on
InfoQ
Keep reading





