← All finds

Find No. 005 · Oct 18, 2026 · 2 min read

TypeScript Compiler Rewritten by AI Agents

An experimental Rust port of the TypeScript 7 compiler, built by AI agents.

pingdotgg/ts-rust
Screenshot of ts-rust

ts-rust (published on npm as tsc-rs) is a Rust port of Microsoft's native TypeScript compiler, the Go one that ships as tsc 7. It has the same command line, language server and API. The problem it targets is a familiar one: type checking a big codebase is slow, and CI waits on it. In the README's benchmark of six open-source apps, tsc-rs 0.6.0 is 2.10x faster than tsc 7 (geometric mean). The author is also upfront that they have never read a line of the code. LLMs wrote it.

How it works

It's a direct port, not a redesign. It keeps Go's algorithms and is pinned to one upstream commit of microsoft/TypeScript, and every result is compared against Go at that same revision. All 184,773 ported Go tests pass. On 60 open-source repos, its output matched tsc 7 on every one.

It keeps the tsc 7 model of 4 checkers, each holding its own copies of the types it needs, because sharing types between them would change the output. If you have spare cores, --fast runs one checker per core, up to 16. Each file still goes to the checker Go would give it, so the output is the same on every run on a given machine.

Effect's language service diagnostics are built in, so an Effect project doesn't need a second compiler pass. On T3 Code with Effect diagnostics on, tsc-rs takes 14.30s and tsc 7 takes 42.55s.

The backstory is also worth reading. Over $400,000 in OpenAI tokens got the port stuck at around 84% compatibility. Opus 5.5 then started from scratch and got further in about two weeks, for roughly $24k.

Try it

npm install -D tsc-rs
npx tsc-rs -p tsconfig.json

It takes the same options as tsc. On large projects you can add --fast if you can spare the extra CPU and memory.

My take

What I like most is the discipline. The upstream is pinned, diagnostics have to match exactly, and the benchmark data is published with hashes. bun check is faster on most of the apps, but its output matched tsc 7 on only 37 of 60 repos. For a type checker, picking correct output over raw speed is the right call.

The limitations are real, though. Some monorepos get extra TS6059 errors. Under tsc -b, a project that imports another project's output without a project reference can read stale or missing output. Editor memory grows slowly over long sessions. --fast used up to 2.2x the CPU time and 1.9x the peak memory in the author's tests. And the install section opens with: "Be warned, I have no idea if this will actually work."

Who should care: teams with slow tsc 7 runs in CI, and Effect users most of all, since that's where the gain is biggest. It's also worth a look if you're curious what agent-written code looks like at this scale. I'd run it in CI next to tsc first, diff the output, and decide from there.