# ts-rust (tsc-rs)

> An experimental LLM-written Rust port of the TypeScript 7 compiler, type checker and language server, distributed as the tsc-rs npm package.

ts-rust (published as tsc-rs) is an open-source Rust port of Microsoft's native Go-based TypeScript compiler, hosted by pingdotgg. It keeps the same `tsc` command line, language server and API, and is installed through npm as `tsc-rs`. The README describes it as an early release produced largely by LLMs.

## What It Is

tsc-rs is a TypeScript compiler and type checker written in Rust. It is a direct port of the Go implementation (microsoft/TypeScript, formerly typescript-go), preserving that implementation's algorithms and behavior, and takes the same options as `tsc`. The npm package is named `tsc-rs` so it does not clash with the `typescript` package. Each release also ships a standalone archive per platform containing the `tsc` binary with its lib files.

It is run with `npx tsc-rs -p tsconfig.json`. A VS Code setup is described in the npm package README. A WebAssembly build exists in the repository, and one stated motivation was a checker that performs well in WASM.

## Effect Diagnostics Built In

The Effect language service diagnostics (codes 377xxx) are built in, so Effect projects do not need a second compiler pass. They run only when the tsconfig includes the `@effect/language-service` plugin, and the language server shows them as well. The rules and options are a port of Effect-TS/tsgo 0.46.1; editor features such as quick fixes, refactors, hover and completions are not ported.

## Compatibility and Performance Claims

The port is pinned to one upstream revision, TypeScript 7.1.0-dev. The author reports that all 181,711 ported Go tests pass and that TanStack Query core and Hono produce diagnostics identical to Go's. The author's benchmarks on an Apple M4 Pro report type checking at about half of Go's time across 60 open-source projects, and a 1.61x geometric-mean speedup over `tsc` 7 on six real-world apps. `bun check` was faster on most of those apps. Published npm packages are built with PGO but without BOLT, so they are slower than the measured build.

## Known Problems and Platforms

Documented differences include TS6059 reports in some monorepos, stale-output reads (TS2305/TS2307) in some `tsc -b` cases, slow editor memory growth during long sessions, and `--version` printing the ported TypeScript version. Linux x64 and macOS arm64 are supported, Linux arm64 comes after 0.1.0, and Windows is not yet available.

## How It Was Built

The author says OpenAI models spent over $400,000 in API-priced tokens without passing about 84% compatibility, while Claude Opus 5.5 restarted from scratch and reached a working v0 in 10 hours, at roughly $24,047 of API spend over two weeks.

## Features
- Drop-in `tsc`-compatible command line (tsc-rs)
- Rust port of the TypeScript 7 Go compiler
- Type checker, language server and API
- Built-in Effect language service diagnostics
- WebAssembly build
- Standalone per-platform binaries
- Benchmarked against tsc 6, tsc 7 and bun check

## Integrations
npm, VS Code, Effect, TypeScript

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

## Pricing
Open Source

## Version
0.1.0

## Links
- Website: https://github.com/pingdotgg/ts-rust
- Repository: https://github.com/pingdotgg/ts-rust
- EveryDev.ai: https://www.everydev.ai/tools/ts-rust
