Developers gain faster builds with Cloudflare’s new Rust-based TypeScript compiler port
The experimental tsrs tool promises up to eight times the speed and significantly lower memory use for code checking tasks.

Key points
- Cloudflare and VoidZero are collaborating on tsrs, a Rust port of the TypeScript compiler.
- Early benchmarks show the tool is up to eight times faster than TypeScript 7.0.
- The project aims to enable development environments to run directly within web browsers.
Cloudflare has announced an experimental project called tsrs, which ports the TypeScript compiler to the Rust programming language. This initiative aims to reduce the time developers spend waiting for code checks, allowing them to focus more on building applications. The tool is designed to be significantly faster and more memory-efficient than the current standard implementation.
The project is a collaboration between Cloudflare, VoidZero and Max Schwenk of Owner.com. It is being incubated as part of the Oxc JavaScript compiler toolchain. The team emphasises that this is not a fork of TypeScript, but a faithful port that follows the original language design decisions closely.
What we know
Early benchmarks indicate that tsrs is up to eight times faster than TypeScript 7.0 when using the same number of type check workers. It also uses approximately seventy per cent less memory. These figures were verified in collaboration with the TypeScript team to ensure the configurations compared were identical.
TypeScript 7.1 beta is already up to 2.5 times faster than version 7.0, with some optimizations upstreamed from tsrs. The new tool ships with an adaptive configuration that adjusts based on the machine type, often using more memory to achieve even greater speed gains.
The TypeScript team remains solely responsible for the language’s design and direction. The Rust port must strictly preserve the original implementation to avoid incompatibility. This approach ensures that the long-term vision maintained by the core team is not disrupted by the porting effort.
Historically, only one previous port of TypeScript succeeded: the move from JavaScript to Go. Recent advances in artificial intelligence have enabled large-scale ports to be created quickly, leading to various experimental versions in Rust and C++. There is clear demand for improved performance in type checking.
Rust offers unique advantages for running in WebAssembly environments compared to Go. While Go requires compiling a garbage collector for WebAssembly, Rust’s memory management model allows for straightforward interactions between the guest and host. This efficiency is crucial for running encapsulated development systems in constrained environments like browsers.
Cloudflare Workers have supported WebAssembly for some time and recently added support for native Rust. Running build and deployment systems in tight loops on these workers benefits from the small memory footprint. This efficiency makes it possible to run complete development environments in places where they previously could not operate.
Defender's checklist
- Verify that experimental tools are tested in isolated development environments before use in production pipelines.
- Ensure that any new compiler port strictly adheres to the official language specification to avoid subtle bugs.
- Monitor memory usage closely when switching to adaptive configurations that may increase consumption for speed.
- Confirm that performance benchmarks are comparable by checking that machine types and options match the baseline.
The background in plain language
Teams usually evaluate new compiler tools by checking if they produce identical results to the established standard. It is important to verify that the new tool handles edge cases correctly. Check whether the tool integrates smoothly with existing build systems and package managers. Ensure that the performance gains do not come at the cost of reliability or compatibility with current projects.
What to do and how to stay safe: Cloudflare
- Install the experimental tsrs package from npm to test performance in your specific development environment.
- Compare the output of tsrs with the standard TypeScript compiler to ensure type checking results are identical.
- Monitor memory usage and build times to assess if the adaptive configuration benefits your specific workflow.
- Watch for updates from the TypeScript team regarding any upstreamed optimizations or compatibility notes.
General security guidance from the TechWire Beat newsroom. It is not confirmed advice from the organisations named in this story.
Frequently asked questions
Is tsrs a fork of TypeScript?
No, it is a faithful port that follows the original TypeScript implementation strictly, with the TypeScript team retaining full control over language design.
How does tsrs compare to TypeScript 7.0 in performance?
Early benchmarks show it is up to eight times faster and uses approximately seventy per cent less memory.
Why use Rust instead of the existing Go port?
Rust offers better memory efficiency for WebAssembly environments, enabling development tools to run in constrained places like browsers.



