Post

Introducing tsrs: a Rust port of the TypeScript compiler 🦀 We are not forking TypeScript! ◆ In close collab with the TypeScript team ◆ Up to 8x faster than TS 7.0 & ~70% less memory ◆ Runs in WASM (works in your browser & workers) ◆ Soon part of Oxc npx tsrs blog.cloudflare.com/typescript-r...

blog.cloudflare.comIntroducing tsrs: a Port of TypeScript to RustCloudflare is collaborating on tsrs, a Rust port of TypeScript that is up to 8x faster and uses 70% less memory.

37 reposts264 likes

Language server support? Or is this another port for at best CI/pre-commit hooks?

> First, we are working with Theo Browne to merge tsc-rs and tsrs into a single package that supports all of TypeScript’s features including Language Server Protocol (LSP) and content mappers. I see it is not there yet, but planned.

Does it have any metadata on typescript it can emit or is this once again yet another destructive types all elided compile down where at the end we have only the basic js code? I really want type metadata. Bonus goal not the point here. It just seems so sad, so much less types than I want.

In the Cloudflare blog post they mention they want to enable faster type aware linting in oxlint , however idk if tsrs is capable of that now nor what compiler plugins they provide. Things like gql tada and others are of interest to me for a truly compatible compiler.

Yeah it seems cool. I think ill stick with the new official TS 7, this feels like it solves speed critical things for large projects and I feel safer sticking with the official, yet still very fast, Go version!

8x faster is a big claim for a compiler-shaped wasm binary. how's bundle size land relative to the 1MB-ish worker script ceiling? that's usually the actual wall once you're running anything compiler-adjacent at the edge, not raw cpu.

fair, free tier's 3mb now and paid's up to 10mb compressed. my brain's still stuck on the old 1mb cap, been a minute since i checked the docs

While ive not tried type script, this seems like an amazing milestone, faster compilation / runtime is what every developer seeks!

O damn, working with theo in getting this shit done. I’m sure he’ll be happy to hand off maintenance to a proper team who can handle it.

how many of the tsc conformance baseline files pass, including identical error messages? that's what i'd check before trusting it anywhere near my type errors

If I understood correctly... all of them. They ran until the AI got every test passing. So every _tested_ behavior should be the same, not necessarily every intended behavior in case there were missing tests. I don't know how thoroughly tested the intent of the original code vs just line coverage.