hn.today

Rust Port of TypeScript (Tsc)

github.com45 points56 comments
Screenshot of Rust Port of TypeScript (Tsc)

An experimental Rust port of the TypeScript 7 compiler reproduces the Go-based tsc behavior, command line, language server and API while keeping Go's algorithms. It was built largely by large language models with heavy API spend (initial efforts totaled over $400k in tokens, later reduced to about $24k using different models); the maintainer states they never manually read the generated code. The port is pinned to a TypeScript 7.1.0-dev upstream revision, includes built-in Effect diagnostics (so Effect projects need no second pass), and is provided as an npm package (tsc-rs) and standalone binaries for Linux x64 and macOS arm64. It is released as an early build with warnings about being an early release, but claims full compatibility on every real-world project the maintainer tested.

Benchmarks and test results claim strong correctness and performance: 181,711 ported Go tests pass and diagnostics match Go on oracle test sets. On a T3 Code benchmark without Effect diagnostics bun check was fastest (4.07s), tsc-rs ran in 7.25s, tsc 7 in 16.10s and the older JS tsc 6 in 62.63s; with Effect diagnostics tsc-rs completed in 11.13s versus tsc 7 + Effect at 21.07s. Across six large open-source apps, tsc-rs is reported faster than the Go tsc (about 1.6× faster than tsc 7 by geometric mean) while bun check is faster still; differences include a small set of errors that align with the pinned TypeScript dev revision.

Read on github.com56 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.