ts-rust: Theo Ported the TypeScript Compiler to Rust with AI
Every year a handful of projects land on my list of the best AI tools 2026 not because they’re polished products, but because they’re honest experiments that tell you where the frontier actually is. ts-rust — an LLM-written Rust port of the TypeScript 7 compiler, published by streamer and developer Theo (ping.gg) — is one of those. It’s a working drop-in replacement for tsc that type-checks real codebases faster than Microsoft’s own Go-native compiler, and the author openly admits he has never read a single line of the code.
The README’s first lines get straight to the point: “I wanted to see if LLMs could port the TypeScript compiler, checker and lsp to Rust. Turns out they can.” The motivations are listed as testing model capabilities, making a fast TypeScript type checker, getting a checker that works in WASM, and — in the author’s own words — memes. What makes the project worth taking seriously is that it ships working numbers, not vibes.
What ts-rust actually is
ts-rust (packaged on npm as tsc-rs, so it doesn’t clash with the official typescript package) is a direct port of Microsoft’s native TypeScript compiler, the one written in Go and formerly known as typescript-go. It keeps the Go implementation’s algorithms and behavior, and exposes the same command line, language server, and API. In practical terms that means this works:
npm install -D tsc-rs
npx tsc-rs -p tsconfig.json
tsc-rs accepts the same options as tsc. Prebuilt binaries exist for Linux x64 (static) and macOS arm64; Windows and Linux arm64 aren’t available yet. The port is pinned to a single upstream revision — microsoft/TypeScript commit 673a5f17d713, the TypeScript 7.1.0-dev tree as of September 29, 2026 — so all comparisons are apples-to-apples against the Go compiler at that exact revision.
Two details signal that this isn’t a toy. First, the Effect language-service diagnostics (codes 377xxx) are built directly into tsc-rs, so an Effect project needs no second compiler pass — the diagnostics come out of the same check as the TypeScript ones, and the language server surfaces them too. Second, the compatibility claim is concrete: every one of the 181,711 ported Go tests passes, and the language server and API match Go’s output on the oracle test sets.
How it was built: from $420K of failure to a $24K port
The origin story is the most instructive part, because it’s a clean before-and-after comparison of model capability on a real, enormous, precision-critical task.
Theo’s first attempt used OpenAI models — GPT-5.6 Sol and GPT-6 Astra — driven through /goal loops over multiple months. They wrote more than 1.3 million lines of Rust and, in the author’s accounting, burned over $400,000 in API-priced tokens, and never got past roughly 84% compatibility. Then, noticing how little of his Claude Code limits he was using, he threw Claude Opus 5.5 at the problem. Opus 5.5 produced a working v0 in ten hours, from scratch — not by building on the Codex-generated code, which the author initially assumed, but by starting over. It got further than Astra had in a tenth of the time.
The final tally: about $24,047 of API spend over two weeks, drawn against Claude accounts that were running somewhere between 925% and 983% of the $200 weekly plan limits. “Expensive, for sure, but not that bad considering how much work has went into typescript-go,” the README notes. The repo currently sits at 709 stars, 44 forks, and more than 6,000 commits, under an MIT license.
There’s also a line in the README titled “The Slop Line,” beneath which the author declares that everything was written by his LLMs, not him. It’s a small gesture, but it’s the honest one: this codebase is, in a real sense, an artifact of the model, not of a human carefully reasoning about compiler internals.
Why a Rust compiler matters beyond the memes
The “make a fast type checker” motivation is obvious, but the README lists two others that point at where this actually goes. The first is WASM: a TypeScript compiler that runs natively in the browser opens the door to instant, in-browser type-checking for editors, notebooks, and build tools without a Node or native binary in the loop. The repo already carries a crates/ts_wasm WebAssembly build, so this isn’t just a wish-list item — it’s scaffolding that exists in the tree.
The second is structural. Microsoft’s native compiler is written in Go because the TypeScript team chose Go as the port target, and the ecosystem has been watching to see whether Rust is the better landing spot for performance-sensitive tooling. ts-rust answers that question with a data point: same algorithms, same behavior, roughly 1.6× faster on real-world type checks. That’s not a landslide — bun check is faster still — but it’s a concrete, reproducible argument that the Rust direction is viable, produced at a fraction of the cost of a funded rewrite. For a solo developer to produce that in two weeks with a frontier model is the part that should get the attention of anyone who funds or schedules compiler work.
LLM benchmarks 2026, measured in a compiler port
Strip away the memes and ts-rust functions as a benchmark — not of the compiler, but of the models that produced it. The measurable results are in the type-checking speed, and they’re substantial.
On 60 open-source projects, tsc-rs type-checks in about half of Go’s time, as a geometric mean. On 120 open-source repos, its command-line output differs from the Go compiler’s only in a small list of documented cases (and where Go’s own output changes between runs). The most detailed public numbers come from a full type-check benchmark against real applications, run on an Apple M4 Pro (12 cores, 48 GB, macOS 26.5.1), median of five runs:
| App | Lines checked | tsc 6 | tsc 7 (Go) | tsc-rs | bun check |
|---|---|---|---|---|---|
| VS Code | 3.75M | 54.56s | 6.84s (8.0×) | 4.20s (13.0×) | 1.62s (33.7×) |
| Sentry (frontend) | 2.11M | 58.76s | 7.90s (7.4×) | 4.46s (13.2×) | 3.14s (18.7×) |
| Playwright | 585k | 4.48s | 0.66s (6.8×) | 0.34s (13.2×) | 0.18s (25.0×) |
| Excalidraw | 449k | 5.32s | 0.80s (6.7×) | 0.70s (7.6×) | 0.18s (29.0×) |
| TypeORM | 386k | 3.86s | 0.55s (7.0×) | 0.36s (10.7×) | 0.19s (20.0×) |
| tRPC (server) | 209k | 1.10s | 0.16s (6.8×) | 0.09s (12.0×) | 0.12s (9.1×) |
The multipliers are speedups over tsc 6, the JavaScript compiler. The geometric means are 7.1× for tsc 7, 11.4× for tsc-rs, and 20.9× for bun check — meaning tsc-rs is 1.61× faster than Microsoft’s Go compiler on this set, and bun check is 2.95× faster still. On the T3 Code monorepo, tsc-rs checks the full project in 7.25 seconds (8.6× over tsc 6, 2.22× faster than tsc 7) without Effect diagnostics, and 11.13 seconds with them built in.
The honest caveat, which the README states explicitly: bun check is faster on every app except tRPC, but it reports a few errors no other checker reports (three on Sentry, two on tRPC). So the speed gap between tsc-rs and bun isn’t the headline; the headline is that an LLM-generated Rust codebase outperforms a team-written native compiler on a like-for-like basis.
The critique: is it a real port or a mess with a demo?
The project has drawn exactly the pushback you’d expect. One DEV Community piece is titled “100k lines of TypeScript to Rust via LLM is not a port. It’s a mess with a demo.” The core objection is fair: passing 181,711 tests and matching output on 120 repos doesn’t guarantee the code is maintainable, idiomatic, or something a human could safely extend. A compiler is a long-lived piece of infrastructure, and a codebase nobody has read — including its author — is a maintenance risk regardless of how fast it runs today.
There’s also a known-problems list that’s worth reading before you adopt it. In some monorepos, workspace source files are reachable both through node_modules and a direct import, and tsc-rs can emit output for more files than tsc does, triggering TS6059 (file not under rootDir). In tsc -b builds where one project imports another’s output without a project reference, tsc-rs can read stale or missing output in a few cases. In the editor, memory grows slowly during long sessions — about 20 MiB per 1,000 edits — starting 12–24% above tsc’s baseline before dropping below it around edit 20. None of these are disqualifying for a preview, but they’re the difference between “passes the test suite” and “ready to replace tsc everywhere.”
The broader context is worth noting too: this is no longer a one-off stunt. Microsoft agentically ported its Copilot runtime to Rust for $120,000, per The Register in September 2026, and the company’s own TypeScript team is actively working on the Go-native compiler that ts-rust ports. LLM-assisted porting of large, performance-critical codebases is becoming a repeatable engineering practice, not a novelty.
Who should use this
- Developers curious about where LLM coding capability actually is in 2026, backed by real benchmarks rather than demo videos.
- Effect users who want the Effect diagnostics in a single compiler pass.
- People who want a fast type checker on macOS arm64 or static Linux x64 and are comfortable with an experimental, MIT-licensed preview.
- Teams evaluating whether the Rust port direction is viable before committing engineering time to it.
Who should NOT use this
- Anyone who needs a fully supported, guaranteed-correct compiler in production. This is an early release by one person who hasn’t read the code; use the official Go compiler for anything mission-critical.
- Windows or Linux arm64 shops, where there are no prebuilt binaries yet.
- Teams that need editor features like quick fixes, refactors, hover, and completions — the language-service diagnostics are ported, but those editor features are not.
- Maintainers who would have to own the codebase long-term; an unreadable-by-humans LLM artifact is a liability you inherit, not an asset.
Limitations and caveats
Set expectations carefully. The port is pinned to one TypeScript 7.1.0-dev revision and compared against the Go compiler at that same revision; as upstream moves, the parity claim only holds for that pin. The benchmark binaries are built in CI without PGO or BOLT, so the release previews are actually slower than the measured build. The editor memory-growth issue and the monorepo edge cases are real and documented. And the $24K cost figure reflects token spend, not the engineering judgment to know that Opus 5.5 was the right model to try after the $400K dead end — that judgment is the part you can’t buy with tokens. As a statement about what frontier models can do, ts-rust is compelling. As a compiler you’d bet a production codebase on, it’s still a preview — but it’s a preview that redefines what “preview” can mean.