Cloudflare is building tsrs, a Rust version of the TypeScript compiler that runs up to 8x faster than TypeScript 7.0 in early tests. Cloudflare says it uses about 70% less memory when both use the same number of type check workers. A compiler is the tool that checks code and turns it into something a computer can run.
Cloudflare says it is working with VoidZero and Max Schwenk of Owner.com, in close collaboration with the TypeScript team. The project is incubating as part of the Oxc JavaScript compiler toolchain. Cloudflare says tsrs is not a fork. It follows the language design decisions of the TypeScript team, which stays in charge of the language.
Cloudflare says it compared identical configurations with the TypeScript team. TypeScript 7.1 beta is already up to 2.5x faster than 7.0, and some of those gains were upstreamed from tsrs. By default, tsrs adapts to the machine type, using more memory in exchange for more speed.
Cloudflare points to WebAssembly, a format that runs code in browsers and similar environments, as a reason for choosing Rust. Go programs must bring their garbage collector along when compiled to WebAssembly. An experimental release is available by installing the tsrs package from npm.
Source: Introducing tsrs: a Port of TypeScript to Rust | Cloudflare Blog.