Skip to content

tsz-org/tsz

Repository files navigation



tsz logo



tsz is a performance-first TypeScript compiler in Rust. z is for Zang!1 The goal is a correct, fast, drop-in replacement for tsc, with both native and WASM targets.

tsz is built the with help of AI-assistant coding. Many tools and AI models were used during its development.

Performance

tsz is aiming to be 2x faster than tsgo on all benchmarks. It is 3x faster in small file samples. Work on larger projects is underway.

Latest tsz vs tsgo benchmark performance

Install

Warning

tsz is pre-release software and not yet a drop-in replacement for tsc. Diagnostics, inference, and emit may differ from TypeScript today. Use for experimentation only.

To check whether tsz currently matches tsc on your project:

npx try-tsz

macOS & Linux

curl -fsSL https://tsz.dev/install | sh

Windows (PowerShell)

irm https://tsz.dev/install.ps1 | iex

TypeScript compatibility

tsz runs TypeScript's own test suite for compatibility across type-checking, code emission, and LSP.

Currently targeting TypeScript@6.0.3

Type Checker

To ensure tsz is a drop-in replacement for tsc, we run the official TypeScript conformance test suite against it.

Progress: [████████████████████] 100.0% (12,585/12,585 tests)

Emitter

JavaScript:  [████████████████████] 99.5% (13,468 / 13,530 tests)
Declaration: [████████████████████] 99.5% (1,661 / 1,669 tests)

Language Service

Progress: [████████████████████] 99.9% (6,558 / 6,562 tests)

1: "Zang" is the Persian word for "rust".

About

A performance-first TypeScript checker

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors