Brand logo
HomeHardwarePolicy & RegulationSoftwareCommunicationsConsumer ElectronicsGeneralAbout Us
  1. Home
  2. /
  3. software
  4. /
  5. cloudflare-voidzero-back-tsrs-rust-typescript-port

MyTechDailyNews Software Field Guide: How to Trial tsrs, Cloudflare's Rust TypeScript Port, Without Breaking Your Build

You fire off npx tsrs, watch a full type check land before your coffee cools, and ask the obvious question: can you trust what it just reported? Short answer: yes for experiments and shadow checks, not for production builds. Cloudflare and VoidZero, working with Max Schwenk of Owner.com and the TypeScript team, describe tsrs as an experimental Rust port of the TypeScript compiler—not a fork—that runs up to 8x faster with ~70% less memory than 7.0.

That headline is real, but it is also the easy part. The hard part of any compiler migration is conformance: whether the faster tool reports exactly what the reference implementation reports. This guide looks past the benchmark slide and walks through what to check, what to pin, and where the port still differs from upstream TypeScript.

What is tsrs, and why is everyone careful to say it is not a fork?

tsrs is an experimental, drop-in port of the TypeScript compiler and language server written in Rust, incubated inside the Oxc JavaScript compiler toolchain. It is not a fork: design and direction of the language stay with the TypeScript team, which alone decides what conformance means.

That distinction matters more than it sounds. The TypeScript team can move quickly on many fronts, yet for certain features it may spend years deliberately exploring options and building prototypes before choosing an implementation. A Rust port has to track those choices closely or it will fracture and become incompatible. The language must be preserved strictly against its original implementation. The project's own announcement frames the motivation as a question: “TypeScript's Go port already made TypeScript 10x faster and far more memory efficient than the previous version written in TypeScript. Why isn't that enough?”

Is it actually faster, and how were the numbers measured?

Yes—under matched conditions. When the same number of type check workers is used, tsrs can run up to 8x faster and consume ~70% less memory than TypeScript 7.0. The next version of the reference compiler already delivers broad gains too: 7.1 beta can be up to 2.5x faster than 7.0, with several of those optimizations upstreamed from tsrs.

Those figures are only meaningful because the configuration behind them was aligned with the TypeScript team. Other ports have published performance claims using larger machine types or options that differ from TypeScript's defaults, which inflates the gap. If you reproduce the test yourself, hold the machine type and compiler options constant.

ImplementationLanguageClaimed speedMemory
Earlier TypeScript compilerJavaScriptBaseline for the Go comparisonBaseline
TypeScript 7.0Go10x vs the previous TypeScript-written versionFar more memory efficient
7.1 betaGoUp to 2.5x vs 7.0Not stated
tsrsRustUp to 8x vs 7.0~70% less vs 7.0

Read the baselines carefully—the rows are not all measured against the same reference. By default tsrs also ships with an adaptive configuration that varies with the machine type; it uses more memory but runs even faster. On a memory-constrained CI runner, pin that back to a fixed worker count.

Independent write-ups add practical context. The oxc-project/tsrs repository on GitHub describes its goal as 100% conformance and a drop-in replacement for the TypeScript 7 compiler and language server, and it maintains a compatibility report worth reading before you switch anything. Flavio Copes's hands-on deep dive notes that the experimental build can also produce JavaScript and declaration files, so it is more than a type checker—though the experimental label still applies.

How do I try tsrs step by step?

Treat it as a shadow checker, never a silent replacement. The safe path is to run it beside tsc and compare results before you touch any build script.

  1. Install the experimental package from npm with npm install tsrs, then run npx tsrs.
  2. Start with a check-only pass so no files are emitted: npx tsrs -p . --noEmit.
  3. Build a baseline with tsc --extendedDiagnostics on the same project, hardware and options; repeat several times because outliers skew compiler timings.
  4. Compare diagnostic counts between tsc and tsrs. Both should flag the same fault on a deliberately broken type—for example a misspelled property should still surface the same TS2339.
  5. Pin the exact version. Experimental releases do not promise a stable interface, so a floating version can change results between runs.
  6. Keep adaptive mode off on memory-limited runners until you have measured its footprint.

What are the common pitfalls and misconceptions?

The recurring mistake is reading “8x” as “my build gets eight times faster.” The number comes from a matched benchmark; your project, options and machine decide the real delta.

  • Myth: it is a fork. It is a port, and language design stays with the TypeScript team.
  • Myth: fewer diagnostics means a better compiler. Conformance is the point. Differences from upstream TypeScript still exist today, such as the order in which diagnostics are printed.
  • Myth: drop-in means CI-ready. It is experimental; run it in parallel and pin the version first.
  • Myth: adaptive is always better. It trades more memory for speed, which can hurt a constrained runner.

Why Rust and Wasm—isn't the Go port enough?

Speed is not the only consideration; portability is. Rust brings a particular advantage: running in WebAssembly. The Rust + Wasm combination has long been strong, partly because of Rust's language design. Compiling a Go program to Wasm means compiling Go's garbage collector as well, while Rust's memory management model supports direct memory interaction between a WebAssembly guest and a host. That memory efficiency is a central reason Rust fits WebAssembly use cases so well.

The timing is deliberate. Ports of TypeScript into other languages have been attempted many times over the years; given the complexity, only one succeeded—the TypeScript team's port from JavaScript to Go. Frontier AI models can now perform large-scale ports almost independently within days, so the landscape includes slopforks, faithful ports, and complete re-architectures of TypeScript in Rust or C++. Demand for faster TypeScript is clearly present.

For Cloudflare the endgame is deployment reach. Cloudflare Workers have supported Wasm for a long time, and a few weeks ago Cloudflare announced support for native Rust in Workers through the new Emscripten target for wasm-bindgen. When build and deployment systems run in tight loops on Workers, a small memory footprint quickly becomes valuable: fully encapsulated development systems can operate in places where they previously could not. Combined with agents, this opens new possibilities—a development toolchain can run end to end inside a fully sandboxed environment on Cloudflare. With Wasm, the same environments can also run safely client-side in a browser, on an embedded device, or in an IoT application. With more than 10 million developers building on Cloudflare, making the underlying developer toolchain faster, more portable and easier to run in more places matters greatly.

How do the maintainers keep tsrs aligned with upstream?

By copying a maintenance system that already works, not by hoping. First, Cloudflare is working with Theo Browne to merge tsc-rs and tsrs into one package that covers all TypeScript features, including Language Server Protocol (LSP) and content mappers. Second, the method used to keep Vinext aligned with its upstream, Next.js, has worked well and is being reused.

Concretely: Each morning, an agent reviews changes, fetches diffs, and opens tracking issues for anything that may affect Vinext. Every night, the compatibility matrix is regenerated by running the Next.js test suite against Vinext. When a test or issue reveals a gap, agents can locate the relevant change across both codebases, build a reproduction, port relevant tests, and suggest a fix. The same approach will be applied to TypeScript, with great care taken to avoid behaviors that diverge from upstream. Whenever performance improvements are found, they will be contributed back to the TypeScript Go codebase so everyone benefits. Before a stable release, the goal is to reduce remaining differences to a minimum.

Where does tsrs fit in the wider toolchain?

Cloudflare already hosts many free and open source Rust tools that support the JavaScript ecosystem, including Vite, Rolldown, Oxlint, and Oxfmt, and it is eager to test deeper tsrs integrations such as type-aware lint rules in Oxlint. As with Vinext, the goal is to run tsrs as a well-maintained, healthy open source project without obstructing TypeScript itself. The Oxc team has started refactoring the codebase for speed, lower memory use and long-term maintainability, while the TypeScript team is itself experimenting with memory and performance improvements for tsc. The stated aim is to work with the TypeScript team and the JavaScript community to build the fastest faithful implementations of TypeScript together.

FAQ: quick answers before you switch

Is tsrs stable enough for production CI?

No. It is explicitly experimental, with known differences such as diagnostic ordering. Use it as a shadow checker and pin the version.

Do I have to uninstall TypeScript?

No. Keep tsc as the reference compiler. Install tsrs from npm alongside it and compare outputs first.

Will my code need rewriting?

No. The goal is a faithful port with 100% conformance, so the same TypeScript source and tsconfig should apply; conformance gaps are still being closed before a stable release.

Why not just use the 10x Go port?

For raw speed on a server, the Go port may be enough. Rust is chosen for Wasm portability—browsers, Cloudflare Workers, embedded and IoT—where memory footprint and host/guest memory access dominate.

Action checklist and recommendation

My honest take after running the numbers: tsrs is worth your time as a controlled experiment, not as a production swap. The performance story is credible and the upstream-alignment plan is unusually rigorous, but experimental means experimental—conformance gaps are still open.

  • Run it in parallel with tsc for at least one full CI cycle.
  • Compare diagnostic counts and sample error text, not just wall-clock time.
  • Pin the version and disable adaptive mode on small runners.
  • Re-evaluate when the compatibility report and a stable release land.

For the patch-management side of the same discipline, our practical update checklist for teams covers how to stage toolchain updates without surprises. If you want a sense of how we evaluate a new developer tool before recommending a switch, our field guide on whether it's worth switching uses the same trial-first method.

Reference sources

  • Cloudflare, “Introducing tsrs: a Port of TypeScript to Rust”
  • oxc-project/tsrs repository and compatibility report
  • Microsoft, “Announcing TypeScript 7.0”
  • Flavio Copes, “A deep dive into tsrs”
Brand logo

Tech Daily

Your Daily Source for Consumer Tech, Policy & Communications

HardwarePolicy & RegulationSoftwareCommunicationsConsumer ElectronicsGeneralAPAC EdmGrowthAbout Us

© 2026 Tech Daily.

Cookie Notice

We use cookies to improve your experience and analyze website traffic. Read our Privacy Policy to learn more.