tsrs is a Rust port of the TypeScript 7 type checker (the Go compiler, "tsgo"). Each row type-checks one project from microsoft/typescript-benchmarking, the suite the TypeScript team benchmarks tsgo on (vscode, xstate-main, webpack, mui-docs, Compiler, Compiler-Unions), with tsgo 7.0.2 (npm typescript@7.0.2) and with tsrs at commit 955cd91b6dba: tsc -p <project> --noEmit, median of 3 interleaved runs, on Depot CI depot-ubuntu-24.04-8 (8 vCPU, 31 GB RAM, Linux x86_64, AMD EPYC 9R45 96-Core Processor).
Default mode: 4 checker threads in both (tsrs also resolves members lazily, its default)
| project | errors, tsgo / tsrs | tsgo wall (s) | tsrs wall (s) | speedup | tsgo peak memory | tsrs peak memory | memory, tsrs / tsgo |
|---|---|---|---|---|---|---|---|
| vscode | 359 / 371 (ref 371) | 12.50 | 4.39 | 2.84x | 7.82 GiB | 3.27 GiB | 0.42x |
| xstate-main | 0 / 0 | 0.96 | 0.33 | 2.89x | 748 MiB | 510 MiB | 0.68x |
| webpack | 848 / 840 (ref 840) | 1.52 | 0.66 | 2.30x | 1.21 GiB | 705 MiB | 0.57x |
| mui-docs | 0 / 0 | 13.78 | 2.36 | 5.85x | 8.16 GiB | 1.50 GiB | 0.18x |
| Compiler | 43 / 43 | 0.27 | 0.10 | 2.66x | 225 MiB | 215 MiB | 0.95x |
| Compiler-Unions | 41 / 41 | 0.52 | 0.19 | 2.68x | 248 MiB | 215 MiB | 0.87x |
--singleThreaded: one checker thread in both
| project | errors, tsgo / tsrs | tsgo wall (s) | tsrs wall (s) | speedup | tsgo peak memory | tsrs peak memory | memory, tsrs / tsgo |
|---|---|---|---|---|---|---|---|
| vscode | 359 / 371 (ref 371) | 33.92 | 14.12 | 2.40x | 6.61 GiB | 2.80 GiB | 0.42x |
| xstate-main | 0 / 0 | 1.86 | 0.86 | 2.18x | 606 MiB | 313 MiB | 0.52x |
| webpack | 848 / 840 (ref 840) | 3.40 | 1.63 | 2.08x | 940 MiB | 466 MiB | 0.50x |
| mui-docs | 0 / 0 | 14.98 | 4.39 | 3.41x | 3.61 GiB | 1.04 GiB | 0.29x |
| Compiler | 43 / 43 | 0.47 | 0.22 | 2.09x | 176 MiB | 107 MiB | 0.61x |
| Compiler-Unions | 41 / 41 | 0.83 | 0.42 | 1.95x | 203 MiB | 101 MiB | 0.50x |
errors: the number of type errors each compiler reports on the project; they must be equal (a bold cell is a disagreement, i.e. a correctness bug). wall: process wall-clock time. speedup: tsgo wall / tsrs wall (above 1 = tsrs faster). peak memory: maximum resident set size. memory, tsrs / tsgo: below 1 = tsrs uses less.
(ref N): tsgo 7.0.2 and tsrs disagree, but typescript@7.1.0-dev.20260930.4, built from the TypeScript commit tsrs ports (b85298b6), reports exactly tsrs's errors: a TypeScript 7.0 vs 7.1-dev difference, not a tsrs bug.
Runner: Depot CI depot-ubuntu-24.04-8 (8 vCPU, 31 GB RAM, Linux x86_64, AMD EPYC 9R45 96-Core Processor). Date: 2026-10-01 17:05 UTC. tsrs commit: 955cd91b6dba. Numbers from shared CI machines are noisy; compare trends, not single runs. How it is measured: bench/README.md.
A Rust port of the TypeScript 7 type checker. It is tsc --noEmit: same flags, same tsconfig, same diagnostics,
byte for byte. No emit, no language service.
It ports the Go implementation in microsoft/TypeScript (tsc/internal)
at commit b85298b6a81f function for function, and the Go code is the specification: on the TypeScript conformance
suite the output matches the reference on 13,458 of 13,462 error baselines and on all 12,779 .types and .symbols
baselines; the four exceptions are test-harness artifacts. docs/STATUS.md has the details and the comparison on a
38k-file production codebase.
npx -y @maschwenk/tsrs -p path/to/project # macOS arm64/x64, Linux x64/arm64
npx -y @maschwenk/tsrs -p . --singleThreaded # one checker thread (less memory)
or pnpm add -D @maschwenk/tsrs and run tsrs from scripts. --extendedDiagnostics prints the usual counters.
By default tsrs also runs with checker changes that are not merged upstream yet; --noLazyMembers turns them
off and gives the reference-identical mode. None of them changes any diagnostic (verified on the whole conformance
suite, errors, types and symbols):
The last five are Go patches prepared from this port, not yet opened upstream (upstream/).
cargo build --release -p tsrs_cli -p tsrs_testrunner
./target/release/tsrs -p path/to/project
./target/release/tsrs-test run --suite all --baselines types,symbols # conformance suite, ~20 s
CONTRIBUTING.md covers the workflow; docs/PORTING.md, docs/AST.md and docs/CHECKER.md the conventions;
tools/oracle/ the Go oracle programs that compare each stage against the reference.
Derivative work of microsoft/TypeScript (Copyright Microsoft Corporation), Apache-2.0 like the original
(LICENSE, NOTICE); the bundled lib.*.d.ts files are TypeScript's. Not affiliated with or endorsed by
Microsoft. The port was written largely by AI coding agents directed and reviewed by Max Schwenk; its correctness
rests on the evidence above rather than on review alone.
Rust
95.3%
Go
2.0%
Python
1.8%
tsrs is a Rust port of the TypeScript 7 type checker (the Go compiler, "tsgo"). Each row type-checks one project from microsoft/typescript-benchmarking, the suite the TypeScript team benchmarks tsgo on (vscode, xstate-main, webpack, mui-docs, Compiler, Compiler-Unions), with tsgo 7.0.2 (npm typescript@7.0.2) and with tsrs at commit 955cd91b6dba: tsc -p <project> --noEmit, median of 3 interleaved runs, on Depot CI depot-ubuntu-24.04-8 (8 vCPU, 31 GB RAM, Linux x86_64, AMD EPYC 9R45 96-Core Processor).
Default mode: 4 checker threads in both (tsrs also resolves members lazily, its default)
| project | errors, tsgo / tsrs | tsgo wall (s) | tsrs wall (s) | speedup | tsgo peak memory | tsrs peak memory | memory, tsrs / tsgo |
|---|---|---|---|---|---|---|---|
| vscode | 359 / 371 (ref 371) | 12.50 | 4.39 | 2.84x | 7.82 GiB | 3.27 GiB | 0.42x |
| xstate-main | 0 / 0 | 0.96 | 0.33 | 2.89x | 748 MiB | 510 MiB | 0.68x |
| webpack | 848 / 840 (ref 840) | 1.52 | 0.66 | 2.30x | 1.21 GiB | 705 MiB | 0.57x |
| mui-docs | 0 / 0 | 13.78 | 2.36 | 5.85x | 8.16 GiB | 1.50 GiB | 0.18x |
| Compiler | 43 / 43 | 0.27 | 0.10 | 2.66x | 225 MiB | 215 MiB | 0.95x |
| Compiler-Unions | 41 / 41 | 0.52 | 0.19 | 2.68x | 248 MiB | 215 MiB | 0.87x |
--singleThreaded: one checker thread in both
| project | errors, tsgo / tsrs | tsgo wall (s) | tsrs wall (s) | speedup | tsgo peak memory | tsrs peak memory | memory, tsrs / tsgo |
|---|---|---|---|---|---|---|---|
| vscode | 359 / 371 (ref 371) | 33.92 | 14.12 | 2.40x | 6.61 GiB | 2.80 GiB | 0.42x |
| xstate-main | 0 / 0 | 1.86 | 0.86 | 2.18x | 606 MiB | 313 MiB | 0.52x |
| webpack | 848 / 840 (ref 840) | 3.40 | 1.63 | 2.08x | 940 MiB | 466 MiB | 0.50x |
| mui-docs | 0 / 0 | 14.98 | 4.39 | 3.41x | 3.61 GiB | 1.04 GiB | 0.29x |
| Compiler | 43 / 43 | 0.47 | 0.22 | 2.09x | 176 MiB | 107 MiB | 0.61x |
| Compiler-Unions | 41 / 41 | 0.83 | 0.42 | 1.95x | 203 MiB | 101 MiB | 0.50x |
errors: the number of type errors each compiler reports on the project; they must be equal (a bold cell is a disagreement, i.e. a correctness bug). wall: process wall-clock time. speedup: tsgo wall / tsrs wall (above 1 = tsrs faster). peak memory: maximum resident set size. memory, tsrs / tsgo: below 1 = tsrs uses less.
(ref N): tsgo 7.0.2 and tsrs disagree, but typescript@7.1.0-dev.20260930.4, built from the TypeScript commit tsrs ports (b85298b6), reports exactly tsrs's errors: a TypeScript 7.0 vs 7.1-dev difference, not a tsrs bug.
Runner: Depot CI depot-ubuntu-24.04-8 (8 vCPU, 31 GB RAM, Linux x86_64, AMD EPYC 9R45 96-Core Processor). Date: 2026-10-01 17:05 UTC. tsrs commit: 955cd91b6dba. Numbers from shared CI machines are noisy; compare trends, not single runs. How it is measured: bench/README.md.
A Rust port of the TypeScript 7 type checker. It is tsc --noEmit: same flags, same tsconfig, same diagnostics,
byte for byte. No emit, no language service.
It ports the Go implementation in microsoft/TypeScript (tsc/internal)
at commit b85298b6a81f function for function, and the Go code is the specification: on the TypeScript conformance
suite the output matches the reference on 13,458 of 13,462 error baselines and on all 12,779 .types and .symbols
baselines; the four exceptions are test-harness artifacts. docs/STATUS.md has the details and the comparison on a
38k-file production codebase.
npx -y @maschwenk/tsrs -p path/to/project # macOS arm64/x64, Linux x64/arm64
npx -y @maschwenk/tsrs -p . --singleThreaded # one checker thread (less memory)
or pnpm add -D @maschwenk/tsrs and run tsrs from scripts. --extendedDiagnostics prints the usual counters.
By default tsrs also runs with checker changes that are not merged upstream yet; --noLazyMembers turns them
off and gives the reference-identical mode. None of them changes any diagnostic (verified on the whole conformance
suite, errors, types and symbols):
The last five are Go patches prepared from this port, not yet opened upstream (upstream/).
cargo build --release -p tsrs_cli -p tsrs_testrunner
./target/release/tsrs -p path/to/project
./target/release/tsrs-test run --suite all --baselines types,symbols # conformance suite, ~20 s
CONTRIBUTING.md covers the workflow; docs/PORTING.md, docs/AST.md and docs/CHECKER.md the conventions;
tools/oracle/ the Go oracle programs that compare each stage against the reference.
Derivative work of microsoft/TypeScript (Copyright Microsoft Corporation), Apache-2.0 like the original
(LICENSE, NOTICE); the bundled lib.*.d.ts files are TypeScript's. Not affiliated with or endorsed by
Microsoft. The port was written largely by AI coding agents directed and reviewed by Max Schwenk; its correctness
rests on the evidence above rather than on review alone.
Rust
95.3%
Go
2.0%
Python
1.8%