Cloudflare leads Rust port of TypeScript for faster AI agent workflows
Cloudflare has taken ownership of tsrs, a Rust-based TypeScript compiler that is eight times faster than version 7.0. The project aims to support AI coding agents while collaborating with Microsoft on
Cloudflare has assumed leadership of tsrs, a high-performance Rust port of the TypeScript compiler originally developed at Owner.com. Announced in October 2026, this initiative aims to drastically reduce the computational resources required for type checking, specifically to support concurrent AI coding agents. The project emphasizes collaboration with Microsoft rather than creating a divergent fork of the language.
What happened
The tsrs project began just last month at Owner.com, a restaurant software company facing severe performance bottlenecks. Max Schwenk, the head of AI developer experience there, managed a backend consisting of 37,000 TypeScript files. Using Microsoft’s then-new Go-based compiler, a single-threaded type check consumed 19 GiB of memory and took 80 seconds. This resource intensity made it difficult for multiple AI agents to validate their code changes simultaneously, forcing the team to rely on compromised cloud-based development environments.
To solve this, Schwenk directed AI agents to rewrite the compiler in Rust, writing zero code himself. The resulting prototype proved significantly more efficient, leading Cloudflare to take ownership of the project. Christoph Nakazawa, Cloudflare’s director of engineering, clarified that this is not a fork. Instead, Cloudflare is working directly with the TypeScript team to share optimizations. As a result of this collaboration, the upcoming TypeScript 7.1 release is already approximately 2.5 times faster than its predecessor.
How it works
Tsrs replaces the JavaScript and Go implementations of the TypeScript compiler with a version written in Rust. While Microsoft chose Go for its TypeScript 7.0 rewrite to avoid complex memory management issues inherent in porting the existing architecture to Rust, Cloudflare argues that Rust offers superior control. Specifically, Rust does not require a garbage collector, which reduces overhead when running tools in constrained environments like WebAssembly (Wasm) or isolated Workers sandboxes.
The development process itself relied heavily on AI assistance. Schwenk deployed more than 20 AI subagents in parallel to handle the implementation. To ensure correctness, the project uses TypeScript’s official conformance tests and deliberately introduces errors into real projects to verify detection. It also employs Miri, a tool for detecting memory-safety problems in Rust. This rigorous testing uncovered a memory bug that only appeared in optimized builds, highlighting the importance of validation in AI-generated code.
Key details
- Tsrs is up to eight times faster and uses 70% less memory than TypeScript 7.0.
- The project was initiated by Max Schwenk at Owner.com using Anthropic’s Claude Opus 5.5.
- Cloudflare engineers Boshen Chen and Dimitri Mitropoulos co-authored the announcement with Nakazawa.
- Tsrs is being developed as part of Oxc, VoidZero’s Rust-based JavaScript toolchain.
- Microsoft’s Daniel Rosenwasser confirmed that optimizations from tsrs are improving TypeScript 7.1.
- The project uses Miri and conformance tests to maintain compatibility with upstream TypeScript.
Why it matters
For software engineers building products with AI, the cost of type checking is a major bottleneck. As AI agents write and refactor code in tight loops, they need immediate feedback. Traditional compilers often struggle to provide this speed without exhausting system memory, especially in large monorepos. By reducing memory usage by 70% and increasing speed eightfold, tsrs enables more agents to work concurrently on the same machine. This shifts the economics of AI-assisted development, allowing for local, rapid validation instead of relying on expensive remote infrastructure.
Furthermore, this move signals a broader trend of using AI to migrate critical infrastructure to Rust. Companies like GitHub, Anthropic, and Meta have recently used AI agents to rewrite components in Rust. However, these migrations raise questions about verification. Cloudflare’s approach of maintaining strict compatibility with Microsoft’s reference implementation offers a model for how organizations can adopt AI-generated systems safely. It demonstrates that speed gains must not come at the expense of correctness, as a faster compiler that misses errors is ultimately useless.
What you can do
- Monitor the progress of tsrs within the Oxc toolchain to evaluate its readiness for your projects.
- Review the conformance testing strategies used by the tsrs team to apply similar rigor to your AI-generated code.
- Consider the memory footprint of your current CI pipelines and identify if a Rust-based tool could reduce costs.
- Stay updated on TypeScript 7.1 features, as many optimizations are being shared between Microsoft and Cloudflare.
- Experiment with running development tools in WebAssembly environments to leverage Rust’s lack of a garbage collector.
- Evaluate whether your team’s workflow requires concurrent AI agent validation and plan infrastructure accordingly.


