A new open-source project named tsrs has emerged, presenting an implementation of the TypeScript compiler in Rust. This project is the result of close cooperation between several technology teams and developers, with the aim of integrating it into the broader ecosystem of JavaScript compilation tools.
The main motivation behind this effort is to allow developers to spend less time waiting for code checks and more time on actual development. Furthermore, increasing TypeScript's speed and reducing its memory footprint opens the door to deploying complete development environments in previously inaccessible locations, such as directly in a web browser.
It is important to emphasize that tsrs is not a forked version of TypeScript. The project's developers firmly believe that the team behind TypeScript should continue to fully control its design and direction. Their long-term vision and successful adaptation of TypeScript within the JavaScript community are crucial. The goal is to strictly preserve the TypeScript language as defined by the original implementation, and the TypeScript team remains solely responsible for its definition.
Initial benchmarks of the Rust rewrite are very promising. tsrs is up to eight times faster and consumes approximately 70% less memory compared to TypeScript version 7.0, when using the same number of workers for type checking. Interestingly, some of these optimizations have already been integrated into an upcoming version of TypeScript (e.g., 7.1 beta is up to 2.5x faster than 7.0), which demonstrates the potential for mutual cooperation. Benchmarks were conducted in close coordination with the TypeScript team to ensure comparable configurations.

Need a hand with your website or app?
Get in touch and I will reply within 24 hours with a proposal for the next step.
Regarding the choice of language, the question arises as to why Rust, when a Go port of TypeScript already exists, which brought significant improvements in speed and efficiency. The reason is not only speed but primarily Rust's unique advantages when running in WebAssembly (Wasm). Rust's memory management model allows for direct interaction between the Wasm module and the host environment, as it does not require compiling its own garbage collector, unlike Go. This makes Rust much more suitable for WebAssembly scenarios where memory efficiency is crucial.
This capability allows entire software build and deployment systems to operate with a small memory footprint. As a result, fully encapsulated development systems can be run in environments where it was previously impossible – for example, securely client-side in the browser, on embedded devices, or in IoT applications.
The sustainability of the tsrs project is ensured by a well-developed strategy. The project actively seeks to unify with existing TypeScript tools in Rust to offer comprehensive support for all features, including the Language Server Protocol (LSP). Inspiration is drawn from methods proven effective in other open-source projects for maintaining synchronization with their upstream versions. Daily automated processes check for changes, generate diffs, and record potential issues. Compatibility is verified every night by running test suites against the implementation. If discrepancies arise, automated tools identify the differences, create a reproduction, and suggest fixes. This meticulous process aims to ensure that tsrs does not introduce different behaviors from upstream TypeScript. Furthermore, discovered performance optimizations will be contributed back to the Go implementation of TypeScript to benefit the entire community.
The goal is to minimize all minor differences from the upstream TypeScript version, such as the order of diagnostic messages, before a stable version is released. tsrs is intended to become a well-maintained open-source project that complements and accelerates the JavaScript ecosystem without interfering with TypeScript's own development. The team is actively refactoring the code to be faster, less memory-intensive, and easy to maintain. Close collaboration is underway with the TypeScript team and the JavaScript community to collectively build the best and fastest TypeScript implementations.
