# tsrs

> A Rust port of the TypeScript 7 compiler and language server that type-checks and emits like tsc.

tsrs is an open-source Rust port of the TypeScript 7 compiler and language server, maintained by maschwenk. It accepts tsc's flags and tsconfig and reports the same diagnostics as the Go compiler (tsgo) it ports. The README reports that on the vscode codebase it type-checks faster and with less memory than tsc 7.

## What It Is

tsrs works as a drop-in compiler: it type-checks projects, and unless disabled with options such as --noEmit it emits JavaScript, declarations, source maps and tsbuildinfo, and supports build mode (-b). It also provides a language server (tsrs --lsp -stdio) and a Node API server (tsrs --api) serving TypeScript 7's unstable/sync and unstable/async APIs, with documented gaps.

## Fidelity to the Go implementation

The Go code at a pinned TypeScript commit is treated as the specification, so any difference in diagnostics, order, message text or exit code is considered a tsrs bug. The README states it matches the reference on 13,458 of 13,462 error baselines and on all 12,779 .types and .symbols baselines in Go-compatible mode.

## Performance claims

The README publishes benchmark tables comparing tsrs with tsgo 7.0.2 and bun check across seventeen projects, plus a single-threaded WebAssembly build compared with ts-rust's wasm build. These are author-published measurements, with the README noting that CI numbers are noisy.

## Setup path

Run it through npx (@maschwenk/tsrs -p path/to/project) or install it as a dev dependency. Prebuilt binaries cover macOS arm64 and Linux x64/arm64. A WebAssembly package, @maschwenk/tsrs-wasm, runs in Node 22+ and browsers. The language server can be configured for Neovim 0.11+ and VS Code via a tsgo symlink.

## Tradeoffs to know

--watch, --init and --showConfig are not supported, --locale and --generateTrace are ignored, and there are no Windows or Intel macOS binaries. The README says the port was written largely by AI coding agents directed and reviewed by its author, and that it is not affiliated with Microsoft.

## Features
- Drop-in tsc-compatible type checking with same flags and tsconfig
- JavaScript, declaration, source map and tsbuildinfo emit
- Incremental compilation and --build mode
- Multi-threaded checkers with --singleThreaded option
- Language server (--lsp -stdio)
- Node API server (--api)
- WebAssembly build for Node and browsers
- Benchmark comparisons against tsgo and bun check

## Integrations
Neovim, VS Code, npm, Bun, TypeScript

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, VSC_EXTENSION, CLI

## Pricing
Open Source

## Version
0.9.0

## Links
- Website: https://github.com/maschwenk/tsrs
- Documentation: https://github.com/maschwenk/tsrs/blob/main/docs/STATUS.md
- Repository: https://github.com/maschwenk/tsrs
- EveryDev.ai: https://www.everydev.ai/tools/tsrs
