pingdotgg/ts-rust
An experimental Rust port of the TypeScript 7 compiler (tsc)
What it solves
It provides a high-performance alternative to the standard TypeScript compiler (tsc) by porting the TypeScript compiler, checker, and language server protocol (LSP) to Rust. It aims to reduce type-checking time and enable high-performance execution in WebAssembly (WASM).
How it works
The project is a direct port of Microsoft's native TypeScript compiler (originally written in Go). It maintains the same algorithms, behavior, and command-line interface as the original. The port was generated using LLMs (specifically Claude Opus 5.5), which translated the Go implementation into Rust.
Who it’s for
- TypeScript developers looking for faster type-checking in large projects.
- Developers needing a TypeScript checker that can run efficiently in WASM.
- Users of the Effect framework, as it has built-in Effect language service diagnostics.
Highlights
- Significant Speedup: Benchmarks show it is roughly 11.4x faster than
tsc6 and 1.61x faster thantsc7 (the Go compiler) on average across real-world apps. - Drop-in Replacement: Uses the same command-line options as
tscand can be installed via npm astsc-rs. - Effect Integration: Includes built-in diagnostics for the Effect language service, removing the need for a separate compiler pass.
- High Compatibility: Reports 100% compatibility in tested real-world projects, passing over 181,000 ported Go tests.
Related
- Project
- Project
- Project
- Project