deniz.in

Markets

Weather

Loading weather

· via Hacker News – Front Page (native)

LLM-written Rust port of TypeScript 7 compiler passes all upstream tests and outruns Go

A developer says LLMs ported Microsoft's Go-based TypeScript 7 compiler to Rust, passing all 181,711 upstream tests and checking types about 1.6× faster than the Go build.

LLM-written Rust port of TypeScript 7 compiler passes all upstream tests and outruns Go

What the project is

A developer publishing as pingdotgg has released ts-rust, packaged on npm as tsc-rs: a port of Microsoft's native TypeScript compiler to Rust. According to the project's GitHub README, which reached the Hacker News front page on October 8, 2026, the port recreates the Go-based compiler Microsoft is preparing as TypeScript 7 — the same tsc command line, language server and API — pinned to an upstream development revision dated 2026-09-29 (TypeScript 7.1.0-dev). It installs alongside an existing project and is meant to accept the same options as the standard compiler.

The README lists three motivations: testing what current models can actually do, producing a faster TypeScript type checker, and eventually running that checker at high performance in WASM, a target Rust suits well.

Written by models, unread by the maintainer

The striking part is how it was produced. Earlier attempts relied on OpenAI models — GPT-5.6 Sol and GPT 6 Astra — and consumed more than $400,000 in API-priced tokens over months, generating over 1.3 million lines of Rust while never exceeding roughly 84% compatibility with the Go compiler. Switching to Anthropic's Opus 5.5 changed the outcome: a working first version appeared in about ten hours, and the author later discovered the model had discarded the earlier code and rebuilt from scratch rather than continuing it. The finished port cost around $24,047 in API spend across two weeks, with the author's Claude subscription usage running at nearly ten times its weekly limits.

The author is unusually candid about the resulting situation: they have not read the generated code, call the release early, and admit uncertainty about whether a given install will work. Builds currently exist for static Linux x64 and macOS arm64 only; Windows and Linux arm64 are not yet available. The port also ships Effect language-service diagnostics, taken from Effect-TS/tsgo 0.46.1, so Effect projects get those checks in a single compiler pass — though editor features like quick fixes, refactors and completions were not ported.

The claimed numbers

All figures below are self-reported in the README:

  • Every one of the 181,711 ported Go tests passes, and on 120 open-source repositories the command-line output matches the Go compiler apart from a short list of known issues.
  • Across 60 open-source projects, full type checks take roughly half the Go compiler's time, measured by geometric mean.
  • On six benchmarked apps — VS Code, Sentry's frontend, Playwright, Excalidraw, TypeORM and tRPC — tsc-rs comes out 11.4× faster than the JavaScript tsc 6 and 1.61× faster than the Go-based tsc 7 by geometric mean. On VS Code's 3.75 million lines, that translates to 4.20 seconds versus 6.84 seconds for Go and 54.56 seconds for tsc 6.
  • Bun's new bun check was faster still on nearly every app (2.95× over tsc 7 by geometric mean), but the README notes it reported three errors on Sentry and two on tRPC that no other checker reported.

The benchmarks ran on an Apple M4 Pro using hyperfine, taking the median of five runs. Two caveats come from the README itself: the published preview binaries are built without PGO and BOLT optimizations and will run slower than the measured builds, and tsc-rs flags extra errors on VS Code and Sentry that the author attributes to tracking a 7.1.0-dev revision containing checks TypeScript 7.0.2 does not yet have.

Why it matters

As an AI capability test, this is a significant data point. A compiler-scale port with full upstream test parity was completed autonomously for roughly $24,000 of inference — after far more expensive runs on other frontier models stalled below 85% compatibility. The gap between those outcomes says a lot about how much variance remains between top models on long-horizon engineering tasks, and about how quickly the economics of such projects are shifting.

For TypeScript developers, it previews a future of much faster feedback loops: a checker dramatically quicker than the JavaScript compiler and meaningfully quicker than Microsoft's own native port, with high-performance WASM as a stated goal. The obvious caveats are that every claim comes from a single maintainer's README, that maintainer has not read the code, and independent verification is still pending. For now it is best treated as a remarkable experiment rather than a production dependency.

  • #typescript
  • #rust
  • #compilers
  • #llms
  • #open-source

Related posts