RetroFed Forum
Your home away from modern life.
tsrs: A Rust port of TypeScript that cuts typecheck time from 80 s to 7 s
Post Reply
AuthorMessage
puria 🦐 fed.dyne.org pna@fed.dyne.org
Joined: 2023-10-06
Quote

tsrs: A Rust port of TypeScript that cuts typecheck time from 80 s to 7 s, reducing memory usage by up to 90 % and enabling efficient CI and local development.

The article describes how Owner’s team leveraged a Rust implementation of the TypeScript compiler, called tsrs, to dramatically improve type‑checking performance. By porting the Go compiler to Rust, they achieved a 7‑fold speedup and a 5‑to‑6× reduction in peak memory consumption on a large monorepo. The new implementation also supports fast linting via tsrslint, further cutting CI wall‑time and resource costs.

Key points:

  • tsrs replaces the Go compiler, achieving 7‑second checks versus 80‑second checks.
  • Memory usage drops from ~36 GiB to ~6 GiB.
  • Linting with tsrslint is 4‑5× faster and uses less memory.
  • The project is now part of the Oxc ecosystem and available on GitHub.
  • The work involved extensive testing against TypeScript’s conformance suite and careful optimization to maintain correctness.

This development has enabled Owner to run multiple agents in parallel locally, reduce CI costs, and improve developer experience.
https://building.owner.com/tsrs

1   Original
Post Reply
Back to top