Rust Port of TypeScript (Tsc)
LLMs managed to port the TypeScript compiler, checker, and Language Server Protocol (LSP) to Rust. The project was completed for approximately $24,047 in API tokens over two weeks. The resulting rust port, named tsc-rs, maintains 100% compatibility with real-world projects tested. It functions as a drop-in replacement for the vast majority of apps.
Tsc-rs is a direct port of Microsoft's native TypeScript compiler, which is written in Go. It inherits Go's algorithms and behavior while preserving the same command-line interface, Language Server, and API. The npm package is named tsc-rs to avoid clashing with the typescript package. The port includes standalone archives for Linux x64 and macOS ARM64.
To use it in VS Code, refer to the npm package README. tsc-rs incorporates Effect language service diagnostics (codes 377xxx) when the tsconfig includes the plugin. The port is tied to a specific upstream revision of Microsoft/TypeScript, and comparisons are made with that revision. The port also covers the rules, options, and @effect-diagnostics comments from Effect-TS/tsgo 0.46.1.
Editor features like quick fixes, refactors, hover, completions are not ported. The port is pinned to one upstream revision, and differences may arise when the port moves to a newer pin. Tsc-rs reports the same 221 Effect diagnostics as the other compilers. In comparison with tsc 6 and tsc 7, tsc-rs shows a 1.61× speedup, while bun check is 2.95× faster.
Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.