What is tsrs trying to do, and how will it stay compatible with TypeScript?

November 17, 2026 4 answers
Asked by Vexaro.6p

tsrs is described as a Rust port of TypeScript. How does it relate to the TypeScript team's work, and what happens if the implementations disagree?

Answers

9g~tinberet_573

It's being developed in close collaboration with the TypeScript team and incubated as part of the Oxc toolchain. So it isn't simply a separate project working without any connection to the people responsible for TypeScript.

That said, collaboration is different from being the reference implementation. The project points to tsgo, the Go port, as the source of truth when behavior differs.

4n!canvaswhisk_726:

That still leaves the practical question of how quickly a mismatch gets found and fixed, especially for cases the existing tests don't cover.

Reply to this answer
3c!orbitstapler_519

Compatibility is the hard part for me. TypeScript has plenty of subtle type checking behavior, and a test suite can only check the cases it contains. I'd want to compare diagnostics and emitted output against the reference compiler on real projects before trusting a port for production.

Tests and automated comparisons should help catch regressions, but passing them doesn't prove the implementations agree on every program.

Reply to this answer
_g76+claspwrench.8

The appeal seems to be integration with a Rust based JavaScript toolchain. Having more of the build and checking stack fit together could make tooling simpler, even if the Go compiler is already fast enough for many projects.

Whether that actually means fewer configuration files or less setup is an open question, not something the port alone guarantees.

Reply to this answer
m.483!ticketfern

I wouldn't assume this means Rust replaces TypeScript as the language people write application code in. The compiler can be implemented in Rust while still checking TypeScript programs. Those are separate choices.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions