Skip to content
Tuesday, October 20, 2026AboutContactRSS
Tech News

Cloudflare launches tsrs, a Rust port of TypeScript compiler

Cloudflare and VoidZero introduce tsrs, a Rust-based TypeScript compiler that runs up to eight times faster with significantly reduced memory usage.

Illustration: A sleek silver laptop sits open on a minimalist white desk.
AI-generated illustration: Threat Times

Key points

  • Cloudflare and VoidZero are collaborating on tsrs, a Rust port of the TypeScript compiler.
  • Early benchmarks show tsrs is up to 8x faster and uses 70% less memory than TypeScript 7.0.
  • The project aims to enable complete development environments to run inside web browsers.

Cloudflare and VoidZero have announced tsrs, a new Rust port of the TypeScript compiler developed in collaboration with Max Schwenk of Owner.com. The project is being incubated as part of the Oxc JavaScript compiler toolchain and works closely with the official TypeScript team to ensure compatibility.

According to Cloudflare, early benchmarks indicate that tsrs performs up to eight times faster than TypeScript 7.0 while consuming approximately 70% less memory. These performance gains were measured using the same number of type-checking workers to ensure a fair comparison between the two implementations.

Technical Context and Strategy

Cloudflare states that the goal is to reduce the time developers spend waiting for code checks, allowing them to focus on building applications. The company emphasizes that this effort is not a fork of TypeScript. The TypeScript team retains full control over the language’s design and direction, with tsrs strictly following their implementation decisions to prevent incompatibility.

The source material notes that while the TypeScript team moves quickly on many features, they may spend years exploring options before selecting an implementation. A Rust port must adhere closely to these decisions. Some optimizations from tsrs have already been upstreamed to the main TypeScript project, contributing to performance improvements in TypeScript 7.1 beta.

WebAssembly and Browser Development

Rust offers distinct advantages for WebAssembly (Wasm) compared to other languages like Go. When compiling Go to Wasm, the garbage collector must also be compiled, whereas Rust’s memory management model allows for straightforward memory interactions between the Wasm guest and host. This efficiency makes Rust a better fit for Wasm use cases, particularly for memory-constrained environments.

Cloudflare Workers have supported Wasm for a long time and recently announced support for native Rust in Workers via the Emscripten target for wasm-bindgen. The reduced memory footprint of tsrs enables the running of fully encapsulated development systems in places where they previously could not operate, such as directly within a web browser.

What should you do?

Developers interested in testing the performance improvements can install the experimental tsrs package from npm. According to Cloudflare, the tool ships with an adaptive configuration by default that utilizes more memory to achieve even greater speed, depending on the machine type. Users should verify that their development environments support the experimental release before adopting it for production workflows.

What to do and how to stay safe: Cloudflare

  • Test the experimental tsrs package from npm in isolated development environments to evaluate performance gains.
  • Verify that your build pipelines and type-checking configurations are compatible with the new toolchain before full adoption.
  • Monitor official announcements from the TypeScript team regarding upstreamed optimizations and future compatibility updates.
  • Review memory usage metrics when running tsrs with its default adaptive configuration to ensure it fits your infrastructure constraints.

Step-by-step guide: Mobile Device Security: How to Protect Data Beyond Passwords

General security guidance from the Threat Times newsroom. It is not confirmed advice from the organisations named in this story.

Frequently asked questions

Is tsrs a fork of the TypeScript compiler?

No, Cloudflare states that tsrs is not a fork and the TypeScript team remains in full control of the language’s design and direction.

How does tsrs compare to TypeScript 7.0 in performance?

Early benchmarks show tsrs is up to 8x faster and uses approximately 70% less memory than TypeScript 7.0 with the same worker count.

Can tsrs run in a web browser?

Yes, the improved memory efficiency and Rust’s compatibility with WebAssembly aim to bring complete development environments directly to the browser.

Sources

  1. Cloudflare
Related articles