RC RANDOM CHAOS

tsrs Brings Rust to TypeScript, 8x Faster

· via Hacker News

Original source

Tsrs: A Port of TypeScript to Rust

Hacker News →

Cloudflare and collaborators have released tsrs, a Rust implementation of the TypeScript compiler built within the Oxc toolchain. Early benchmarks show the port achieves up to 8x faster compilation and 70% lower memory usage than TypeScript 7.0 when configured identically to the original. The team emphasizes this is not a fork—TypeScript’s core team retains full control over language direction. tsrs instead follows the reference implementation closely to maintain strict compatibility.

The timing reflects advances in frontier AI capabilities—models can now perform large-scale ports in days, creating demand for optimized TypeScript. Beyond raw speed, Rust was chosen for WebAssembly efficiency: its memory model compiles cleanly to Wasm without the overhead of Go’s garbage collector. This enables running full development toolchains in browsers, Cloudflare Workers, and embedded systems.

Cloudflare plans to keep tsrs synchronized with upstream TypeScript through automated agents that daily review changes and nightly regenerate compatibility matrices against the full test suite. Selected performance improvements will be upstreamed to benefit the broader ecosystem. The goal is to demonstrate tsrs as a maintainable open-source alternative without displacing the original implementation.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.