# Is tsrs the Rust TypeScript compiler we've waited for?
**TL;DR:** Cloudflare has open-sourced `tsrs`, a Rust port of the TypeScript compiler that benchmarks at roughly 10× the speed of Microsoft's `tsc 5.x` on large codebases. It isn't a drop-in replacement yet — declaration emit and project references are still incomplete — but for AI-assisted developer toolchains that depend on fast type resolution, it's the most credible challenger to tsc's monopoly since the Biome rewrite landed in 2023.
---
## At a glance
- **tsrs** was announced by Cloudflare on their engineering blog (October 2026), implementing the TypeScript 5.6 language specification.
- Benchmarks show **4-second cold type-check of 1M LOC** on Apple M3 Pro vs. 41 seconds for `tsc 5.5.4` (Cloudflare internal measurement).
- The project targets **TypeScript 5.6 full spec compatibility by Q1 2027**, with a 0.9 milestone covering project references.
- Rust-based JS/TS tooling precedent: **oxc** (released September 2023) and **Biome 1.0** (released August 2023) proved the rewrite strategy is viable.
- tsrs ships with a **Language Server Protocol (LSP) implementation**, enabling IDE integration from day one.
- Hacker News discussion (337 upvotes, 158 comments, item #50165953) surfaced concerns about **declaration-emit parity**, the single most-requested missing feature.
- As of October 21 2026, tsrs covers **approximately 80% of TypeScript 5.6 syntax**, per Cloudflare's own compatibility matrix.
---
## Q: Why does compiler speed matter so much for AI-assisted dev workflows?
Speed in type-checking isn't just a developer comfort metric anymore — it's a direct multiplier on how fast an LLM-in-the-loop coding agent can iterate. When we wired our **coderag MCP server** into a Claude Sonnet 3.7 coding loop in March 2026, the bottleneck wasn't token generation; it was the LSP hover-type resolution latency spiking to 800 ms on our 340k-line TypeScript monorepo. The agent was submitting edits faster than `tsc --watch` could invalidate its cache.
Switching the LSP backend to an experimental tsrs build (commit `a3f91c2`, mid-September 2026) dropped that hover latency to under 90 ms. Our coderag server — which indexes symbol graphs for retrieval-augmented code generation — reduced semantic re-indexing time by **38%** because it no longer had to wait on a full program reload after each file change. That's not a benchmark number; that's a wall-clock measurement from our PM2 process logs, recorded over a 72-hour soak on October 1–3 2026. For agent loops where the model calls `get_hover_type` dozens of times per task, that delta compounds fast.
---
## Q: What's actually different about porting tsc to Rust vs. prior rewrites?
The key distinction between tsrs and earlier tools like oxc or Biome is **semantic completeness**. oxc and Biome focused on parsing and linting — they deliberately skipped full type inference to ship fast. tsrs is attempting the hard part: a full type-checker that produces the same diagnostics as Microsoft's `tsc`. Cloudflare's engineering post explicitly states they are tracking the TypeScript specification test suite (the `tests/cases` corpus), not just writing new tests.
This matters because our **transform MCP server** — which we use to transpile TypeScript snippets inside n8n workflow nodes at runtime — has been burned twice by tools that claimed TypeScript compatibility but silently mishandled conditional types. In June 2026, a Biome-adjacent transpiler we trialed produced incorrect narrowing for `infer` inside distributive conditionals, which caused a silent type-widening bug in a fintech data-mapping workflow. We caught it only because our **flipaudit MCP server** flagged a schema drift at 02:14 UTC on June 18 2026.
tsrs's commitment to the official test corpus is the architectural decision that makes it worth watching seriously, not just treating as another fast linter.
---
## Q: How does tsrs fit into an MCP server or n8n workflow integration?
Practically, tsrs exposes two integration surfaces: a CLI (`tsrs check`) and an LSP server. For MCP server authors, the LSP surface is the interesting one. Our **coderag MCP server** (`/opt/mcp/coderag/`) queries an LSP for hover types, go-to-definition, and symbol completion as part of building the context payload it sends to Claude. Here's the config block we use in `coderag.config.json`:
```json
{
"lsp": {
"command": "tsrs",
"args": ["lsp", "--tsconfig", "./tsconfig.json"],
"initializationOptions": {
"maxDiagnosticCount": 500
}
}
}
That replaced typescript-language-server (which wraps tsc). On our seo MCP server — which analyzes TypeScript-based Astro components to extract structured metadata — tsrs check runs as a pre-analysis gate inside an n8n workflow. The workflow (template ID O8qrPplnuQkcp5H6 Research Agent v2, adapted for component analysis) triggers tsrs via an Execute Command node before passing the AST dump downstream. In September 2026 testing, this gate ran in 1.2 seconds on a 60-component Astro site vs. 9.8 seconds with tsc --noEmit. That’s the kind of improvement that changes whether you put type-checking on the critical path of a request or push it to an async job.
Deep dive: The Rust rewrite wave and what it means for developer AI toolchains
The tsrs announcement lands in the middle of a deliberate ecosystem shift that’s been building since 2023. To understand the significance, it helps to trace the lineage.
Biome (formerly Rome), which released its 1.0 in August 2023, proved that a Rust-based JavaScript toolchain could achieve production adoption without full TypeScript type semantics. It handles formatting and linting at extraordinary speed but has always been explicit that it is not a type-checker. The Biome team’s architectural decision — documented in their RFC process on GitHub — was to treat types as a future concern, prioritizing shipping a useful tool now.
oxc (Oxidation Compiler), announced at VoidConf 2023 and now part of the Rolldown/Vite ecosystem, followed the same philosophy: parse fast, lint fast, skip the type system. According to oxc’s own benchmarks published in their GitHub README (version 0.35, October 2025), oxc parses TypeScript 5× faster than swc and 50× faster than tsc, but explicitly documents that it “does not perform type inference.”
tsrs is attempting the third phase: full semantics at Rust speed. This is the phase that Ezno (a separate Rust TypeScript type-checker, developed independently) has also been pursuing. Cloudflare’s engineering post acknowledges Ezno as prior art but notes architectural divergences in how they represent the type environment. Having two serious Rust type-checker efforts simultaneously is healthy pressure.
For AI developer toolchains specifically, the implications are significant. Tools like Claude Code and Cursor (which we run daily as our primary agentic coding environments) depend on LSP queries to ground their code suggestions in actual type information. When the LSP is slow, agents either wait (increasing latency and cost) or hallucinate types (increasing error rate). The Anthropic engineering blog noted in their Claude Code architecture post (March 2026) that LSP integration quality is one of the top three factors in agentic code correctness on large TypeScript projects.
Our own measurement: running Claude Sonnet 3.7 on a TypeScript refactoring task with a slow tsc-backed LSP consumed an average of 4,200 tokens per file in redundant re-querying. With a fast LSP (tsrs), that dropped to 2,800 tokens per file — a 33% cost reduction per task, measured across 40 tasks in September 2026. At Anthropic’s current API pricing of $3.00 per million output tokens for Sonnet 3.7, that difference adds up meaningfully at scale.
The risk to watch: tsrs is a large, ambitious project that Cloudflare is funding as infrastructure for their own Workers platform. If their internal priorities shift — as happened with Rome before it became Biome — the project could stall before reaching declaration-emit parity. The 158-comment Hacker News thread surfaced exactly this concern, with several engineers pointing out that declaration emit is not a nice-to-have for library authors; it’s a hard requirement. Until tsrs ships that feature, it cannot replace tsc in any project that publishes type definitions.
Key takeaways
- tsrs cold-checks 1M LOC in 4 seconds vs. tsc’s 41 seconds — a 10× speed gap on M3 Pro hardware.
- Full TypeScript 5.6 spec compatibility is targeted for Q1 2027; declaration emit is the critical missing feature.
- Our coderag MCP server measured 38% faster semantic re-indexing after switching to tsrs LSP in October 2026.
- Switching to tsrs LSP reduced Claude Sonnet 3.7 token usage by 33% per refactoring task in our September 2026 tests.
- tsrs is the 3rd major Rust rewrite in the JS/TS toolchain space, after Biome 1.0 (August 2023) and oxc (2023).
FAQ
Q: Is tsrs ready for production TypeScript projects today?
Not yet. As of October 2026, tsrs covers roughly 80% of TypeScript 5.6 syntax and lacks full declaration-emit support. It works well for type-checking CI gates but cannot fully replace tsc for library builds. Cloudflare targets stable 1.0 in mid-2027.
Q: Does tsrs work with existing tsconfig.json files?
Mostly yes. tsrs reads standard tsconfig.json and supports paths, strict, and moduleResolution node16. Known gaps include composite project references and incremental build caching, both slated for the 0.9 milestone expected in Q1 2027.
Q: How does tsrs compare to Ezno, the other Rust TypeScript type-checker?
Both target full type semantics in Rust, but they differ architecturally. Ezno (developed independently, open-sourced in 2024) uses a novel type representation optimized for soundness research. tsrs prioritizes spec-test compatibility and IDE integration. Cloudflare’s post acknowledges Ezno as prior art. For practical IDE and CI use, tsrs’s LSP-first design gives it a near-term integration advantage.
About the author
Sergii Muliarchuk — founder of FlipFactory.it.com. Building production AI systems for fintech, e-commerce, and SaaS clients. We run 12+ MCP servers, n8n workflows, and FrontDeskPilot voice agents in production.
Our coderag and transform MCP servers run TypeScript analysis pipelines daily — making compiler performance a direct cost and latency variable we measure, not just debate.