Introducing tsrs: a Port of TypeScript to Rust
Summary:
Cloudflare and VoidZero, working with Max Schwenk of Owner.com, have ported the TypeScript compiler to Rust. Early benchmarks, checked with the TypeScript team for matching configurations, show tsrs up to 8x faster than TypeScript 7.0 with about 70% less memory at the same worker count, and some of its optimizations have already flowed back into the TypeScript 7.1 beta. The authors are careful to say this is a port, not a fork: the TypeScript team keeps sole say over the language, and an agent-based sync process will track upstream changes. Two reasons are given for doing it now. Frontier models can carry out a port of this size in days, and Rust compiles to WebAssembly without bundling a garbage collector, which matters for running dev tools in browsers and Workers. Type checking is already the slowest part of this site's own checks, so we will be watching this closely. It is experimental for now (npx tsrs), with known gaps such as diagnostic ordering.
Excerpt:
"Cloudflare and VoidZero introduce tsrs, an experimental Rust port of the TypeScript compiler, built in close collaboration with the TypeScript team and incubated in the Oxc toolchain."
#TypeScript#Rust#Developer Tools#Performance#Open Source
Read Full Source