tsrs: A Rust Port of the TypeScript 7 Type Checker
tsrs is a Rust port of TypeScript 7's Go type checker, delivering 2-7x speedups over tsgo with lower memory use in benchmarks.
tsrs is a function-for-function Rust port of TypeScript 7's Go-based type checker (tsgo). It targets exact parity with tsc --noEmit: same flags, same tsconfig, byte-for-byte identical diagnostics, with no emit or language-service support.
Benchmarks against real-world projects from microsoft's own typescript-benchmarking suite (vscode, xstate-main, webpack, mui-docs, and the TypeScript compiler itself) show tsrs running 2.4x to 7.17x faster than tsgo 7.0.2, while using roughly half to one-fifth the peak memory in most cases. On the TypeScript conformance suite, tsrs matches the reference output on 13,458 of 13,462 error baselines and all 12,779 .types/.symbols baselines, with the few remaining mismatches attributed to test-harness artifacts rather than bugs.
For engineers working with large TypeScript codebases, type-checking time and memory footprint directly affect CI cost and developer feedback loops. tsrs can be tried immediately via npx or installed with pnpm, is Apache-2.0 licensed as a derivative of Microsoft's TypeScript repository, and was built largely by AI coding agents under human direction and review.
This synthesis was produced from its source by AI; there is no human editor or manual review step. How we work