TECHNOLOGY / EXPLAINED

Introducing tsrs: A Port of TypeScript to Rust

2026-10-27 · GlobalTech Daily Editorial Desk · Source: blog.cloudflare.com

Original editorial illustration for Introducing tsrs: A Port of TypeScript to Rust
Key takeaways Introduction to tsrs Cloudflare and VoidZero are collaborating with Max Schwenk of Owner.com to develop tsrs, a new Rust port of the TypeScript compiler. Authored by Boshen Chen, Dimitri Mitropoulos, and Christoph Nakazawa, this project is being incubated as part of t

Introduction to tsrs

Cloudflare and VoidZero are collaborating with Max Schwenk of Owner.com to develop tsrs, a new Rust port of the TypeScript compiler. Authored by Boshen Chen, Dimitri Mitropoulos, and Christoph Nakazawa, this project is being incubated as part of the Oxc JavaScript compiler toolchain. The development is taking place in close collaboration with the official TypeScript team, with the primary goal of helping developers spend less time waiting for code to be checked and more time building applications. Making TypeScript faster and more memory-efficient also enables complete development environments to operate in new places, such as directly inside web browsers.

Relationship with Upstream TypeScript

The creators emphasize that tsrs is not a fork of TypeScript. The TypeScript team retains full control over the language's design, direction, and long-term vision. The Rust port strictly follows the original implementation decisions made by the TypeScript team, preserving the language definition. While the TypeScript team explores features and prototypes over years before deciding on implementations, the Rust port follows these choices closely to maintain compatibility. Furthermore, some performance optimizations from tsrs have already been upstreamed into TypeScript 7.1 beta, which is up to 2.5x faster than TypeScript 7.0.

Performance and Benchmarks

Early benchmarks show that tsrs is up to 8x faster and uses approximately 70% less memory compared to TypeScript 7.0 when utilizing the same number of type check workers. The creators worked alongside the TypeScript team to ensure that benchmarks compared identical configurations. By default, tsrs includes an adaptive configuration dependent on the machine type, which uses more memory to achieve even higher speeds. An experimental release of tsrs is currently available for installation via npm.

Why Rust and WebAssembly

Although the TypeScript team previously ported TypeScript from JavaScript to Go, yielding significant speed and memory efficiency improvements, Rust offers unique advantages, particularly regarding WebAssembly (Wasm). Compiling a Go program to Wasm requires including Go's garbage collector, whereas Rust's memory management model allows straightforward memory interactions between a Wasm guest and host. This memory efficiency benefits Cloudflare Workers, which support native Rust and allow software build and deployment systems to run in tight loops. This efficiency enables fully encapsulated development systems to run in sandboxed environments on Cloudflare, client-side in browsers, on embedded devices, or within IoT applications.

Maintenance and Future Collaboration

To ensure sustained development, the project is working with Theo Browne to merge tsc-rs and tsrs into a single package supporting all TypeScript features, including the Language Server Protocol and content mappers. The maintainers plan to keep tsrs in sync with upstream TypeScript, minimizing divergences such as diagnostic print orders, and contributing performance improvements back to the upstream codebase. Cloudflare intends to experiment with deeper tsrs integrations, such as type-aware lint rules in Oxlint, aiming to maintain tsrs as a healthy open source project alongside the JavaScript community.

Read the original source: Introducing tsrs: A port of TypeScript to Rust

AI-assisted reporting; source claims are attributed and have not been independently verified.

More to read