Skip to content
Crypt Weekly

The security desk for defenders

Tech News

Try tsrs, the new Rust port of TypeScript for faster builds

Crypt Weekly ·
Illustration: A silver laptop sits on a wooden desk with its screen displaying a minimalist code editor filled with abstract white lines on a dark background.
AI-generated illustration: Crypt Weekly

Cloudflare and partners released tsrs, a Rust-based TypeScript compiler that benchmarks show is up to eight times faster than the standard tool.

Key points

  • tsrs is a collaborative project by Cloudflare, VoidZero, and Owner.com.
  • Benchmarks show the tool uses approximately 70% less memory than TypeScript 7.0.
  • The project is incubated within the Oxc JavaScript compiler toolchain.

Cloudflare announced tsrs, a new Rust implementation of the TypeScript compiler. The tool aims to reduce wait times for code checking and enable development environments to run directly in web browsers.

What happened

Cloudflare, VoidZero, and Max Schwenk of Owner.com are collaborating on tsrs, a Rust port of the TypeScript compiler. According to Cloudflare, the team is working closely with the official TypeScript team to ensure compatibility. The project is being incubated as part of the Oxc JavaScript compiler toolchain. The goal is to help developers spend less time waiting for type checks and more time building applications. Cloudflare stated they are not forking TypeScript and want the original team to retain full control over language design and direction. The Rust port must follow official decisions closely to avoid becoming incompatible with the standard language.

Why it matters

Understanding this release requires knowing how compiler performance affects daily workflow. When you save code, the compiler checks for errors. If that check takes seconds instead of milliseconds, it interrupts your focus. Memory usage also matters when running tools in constrained environments like web browsers or serverless functions. A tool that uses less memory can run in places where heavier tools cannot fit. This shift allows developers to test and build software directly in the browser, removing the need for local setup.

The fix

  • Install the experimental tsrs package from npm to test the new compiler.
  • Compare build times against your current TypeScript setup using identical configurations.
  • Monitor the Oxc toolchain updates for future releases and stability improvements.
  • Ensure your development environment supports the adaptive configuration defaults of tsrs.

Why it matters

Teams evaluating new compiler tools should verify that performance benchmarks match their specific hardware and configuration. It is common for different ports to show varied speeds based on machine size or default settings. Check whether the new tool preserves all existing language features and error messages. Verify that the tool integrates smoothly with your current build pipeline and editor extensions. Ensure that any speed gains do not come at the cost of compatibility with your project’s dependencies or plugin ecosystem.

What to do and how to stay safe: Cloudflare

  • Test the experimental release on a small, non-critical project first.
  • Compare type-checking times and memory usage against your current setup.
  • Verify that all existing type errors are still caught correctly.
  • Wait for official stability updates before adopting in large production environments.

Step-by-step guide: What is password policies and how they protect systems

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

Frequently asked questions

Is tsrs a fork of TypeScript?

No, Cloudflare states they are not forking the language and want the original team to remain in control of its design.

How much faster is tsrs compared to TypeScript 7.0?

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

Why use Rust instead of the existing Go port?

Rust offers better memory efficiency for WebAssembly, allowing development environments to run directly in browsers.

Sources

  1. Cloudflare
CloudflareTypeScriptRusttsrsOxc

You might also like