Introduction
tsc-rs is a TypeScript compiler written in Rust: scanner, parser, binder, type checker, JavaScript and declaration emitter, and a language server, all in one Cargo workspace.
What it is for#
tsc-rs is a tooling-first compiler. It aims to produce the same output as tsc, and then goes further in the directions that tools need:
- Standard compilation. Compile a file or a
tsconfig.jsonproject to JavaScript, with source maps, declarations, watch mode and project references. - Preserve modes. Keep type annotations, comments or whitespace in the emitted JavaScript for runtime type libraries, documentation tools and refactoring tools. See Preserve modes.
- Editor support. A language server over stdio and a VS Code extension. See Language server.
- Embedding. A persistent transpile pipe, a type-check daemon and a WebAssembly build for bundlers, agents and browsers.
- Analysis. Parser-level audits of a monorepo's import graph. See tsc-rs analyze.
How it is measured#
tsc-rs is measured continuously against the upstream TypeScript test suites (compiler, conformance and fourslash), using the baselines that the real tsc produced as the oracle. A case passes only when the output matches.
The README snapshot of 8 September 2026:
| Lane | Compiler suite | Conformance suite |
|---|---|---|
| JavaScript emit | 6,032 / 6,032 (100%) | 5,388 / 5,388 (100%) |
| Diagnostics | 4,617 / 6,529 (70.7%) | 3,418 / 5,907 (57.9%) |
Diagnostics have moved since then. The conformance report tracks the latest wave and has every lane, the method, and the commands to reproduce each row. The progress page shows the change wave by wave.
What it is not#
tsc-rs is not a drop-in replacement for tsc yet. Diagnostics, declaration emit and expanded option variants are not at parity, and the command line surface is a subset.
If you need a type checker you can trust as the last word on a codebase, keep running tsc. If you want a fast compiler you can embed, extend and read, or you want to help close the gap, read on. The Limitations page lists the known differences.
Where to go next#
- Installation: build the binary.
- Quick start: compile something.
- CLI reference: every flag.
- Playground: try the compiler without installing anything.
Found a mistake on this page? Open an issue on GitHub.