Skip to content
AI Primer
release

Theo releases tsc-rs, a Rust TypeScript compiler with claimed compatibility

Theo released tsc-rs with claimed TypeScript compatibility, an LSP, WASM support and Effect checks. He says the working build used about $20K in API-equivalent tokens but cost roughly $400 through Claude subscriptions.

5 min read
Theo releases tsc-rs, a Rust TypeScript compiler with claimed compatibility
Theo releases tsc-rs, a Rust TypeScript compiler with claimed compatibility

TL;DR

  • tsc-rs ships a Rust compiler, type checker and language server as a claimed drop-in replacement for TypeScript, according to the launch announcement.
  • Built-in Effect checks give tsc-rs its edge over Bun in theo's comparison; Bun is faster without those checks.
  • The working build used roughly $20,000 in API-equivalent tokens and cost about $400 through Claude subscriptions, according to his cost clarification.

Opus took the porting brief literally enough to bring chunks of Go's standard library into Rust. The WASM module can check types and emit JavaScript entirely from an in-memory filesystem. The published npm builds omit PGO and BOLT, unlike the optimized build behind the project's broader 60-project speed claim.

TypeScript 7 in Rust

tsc-rs is a direct port of Microsoft's Go-based native TypeScript compiler, preserving that implementation's algorithms, CLI, language server and API, according to the repository. Theo, the project's creator, says in his launch thread that he has not read a single line of its code.

The published native packages cover Linux x64 and macOS arm64. Windows and Linux arm64 are not available yet; the documented installation is:

API-priced tokens and subscriptions

The repository's accounting gives a more precise figure than the announcement's rounded $20,000:

  • Codex attempt: more than $400,000 in API-priced tokens using GPT-5.6 Sol and GPT 6 Astra, over 1.3 million lines of Rust, and several months stalled around 84% compatibility.
  • Opus 5.5 attempt: a fresh start, a working v0 in 10 hours, and roughly $24,047 in API-priced tokens over two weeks.

Separately, Theo highlighted an Anthropic pricing announcement covering:

  • Halved Sonnet 5.5 cache-read prices, with an estimated 20% reduction in costs for most agentic work using that model.
  • A new monthly API credit for Claude Max and Team subscribers.

Compatibility with a pinned upstream

The README limits its “100% compatibility” claim to real-world projects tested and calls this an early release. Its target is commit 673a5f17d713, dated September 29, TypeScript 7.1.0-dev, rather than the TypeScript 7.0.2 used in several benchmark comparisons.

The project reports the following coverage in its status notes:

  • All 181,711 ported Go tests pass.
  • Language-server and API answers match Go on the oracle test sets.
  • Across 120 open-source repositories, CLI differences are limited to documented problems and cases where Go's output changes between runs.

The project also documents known problems:

  • Workspace files reachable through both node_modules and direct imports can produce extra emitted files and TS6059 errors.
  • tsc -b can read stale or missing outputs when a project imports another project's output without declaring a project reference.
  • Editor memory grows by about 20 MiB per 1,000 edits in measured long sessions.

Built-in Effect diagnostics

The fused Effect pass is the clever bit: TypeScript and Effect diagnostics come from the same check. The implementation notes specify:

  • Enable it through the @effect/language-service entry in compilerOptions.plugins.
  • Rules, options and @effect-diagnostics comments are ported from Effect-TS/tsgo 0.46.1, with diagnostic codes in the 377xxx range.
  • Diagnostics also appear in the language server.
  • Effect-specific quick fixes, refactors, hover and completions have not been ported.

Bun check versus tsc-rs

Theo's launch chart sums full checks across five T3 Code projects, separating ordinary TypeScript checks from TypeScript plus Effect diagnostics.

The benchmark methodology uses an Apple M4 Pro with 12 cores and 48 GB RAM, one warmup and the median of five runs, with --noEmit --incremental false. Native binaries run without the npm launcher.

The TypeScript 6 Effect baseline uses a different rule set: it reports 287 Effect diagnostics on apps/server, versus 177 for the ported rules, according to the comparison details.

Theo later said Bun was missing incremental checks, adding another distinction beyond these full-check timings.

WebAssembly

The WASM implementation has a narrower execution surface than the native compiler:

  • The module is 4.2 MB, or 1.8 MB gzip and 1.5 MB Brotli, including compressed TypeScript library files.
  • Checking is single-threaded. The compiled module is reused, but each run gets a fresh instance and releases its memory afterward.
  • --watch, --lsp, --api and plugins or content mappers that launch processes are unsupported.
  • Safari workers can exhaust their stack at roughly 230 terms in a chained addition expression or 200 chained method calls.

Full end-to-end development inside a V8 isolate is the goal Theo described in another reply.

GitHub issue automation

Theo said he had no intention of maintaining the port himself. His posted agent session fetches GitHub issue bodies and comments, with reported incompatibilities taking priority over performance work.

A contributor has already supplied a concrete fix. In a Vue content-mapper report, Strate reproduced serialized transform requests: a generated 3,000-component project took 16.44 seconds with tsc-rs against 7.52 seconds with TypeScript 7.

On October 8, a reply labeled “Claude Opus 5.5 responding on behalf of Theo” said Strate's fix had landed on main, moving transforms onto the parse workers. The reply reported a separate rerun improving from 29.4 seconds to 9.5 seconds with identical output, and said the fix would ship in the next release.

Further reading

Discussion across the web

Where this story is being discussed, in original context.

On X· 5 threads
TL;DR1 post
TypeScript 7 in Rust1 post
API-priced tokens and subscriptions1 post
Bun check versus tsc-rs1 post
WebAssembly1 post
Share on X