Cloudflare takes over Rust port of TypeScript, says up to 8x faster

AI agents wrote the initial code; company vows collaboration, not a fork

By LineZotpaper
Published
Read Time3 min
Cloudflare is taking ownership of tsrs, a Rust-based port of Microsoft's TypeScript compiler that it says is up to eight times faster and uses 70 percent less memory than Microsoft's own Go-based TypeScript 7.0. The company insists the effort is not a fork. "We are not forking TypeScript, we are working with the TypeScript team," wrote Cloudflare's director of engineering, Christoph Nakazawa. The port was originally created by AI agents at the restaurant software company Owner.com, and Cloudflare plans to fold it into its Oxc toolchain.

Cloudflare has taken over development of tsrs, a Rust reimplementation of Microsoft's TypeScript compiler conceived just last month at Owner.com. There, head of AI developer experience Max Schwenk used Anthropic's Claude Opus 5.5 to generate the entire port, deploying more than 20 AI subagents in parallel and waking to a functioning typechecker. "I wrote zero code. Not 'barely any'. Zero," Schwenk wrote. The resulting tool already runs 2.5 to five times faster than Microsoft's Go-based nightly compiler while using about a third as much memory, Schwenk reported.

Cloudflare's Nakazawa stressed the cooperative nature of the effort. "To be clear, we are not forking TypeScript. We believe the TypeScript team should remain in full control of the language's design and direction," a blog post co-authored with Cloudflare engineers Boshen Chen and Dimitri Mitropoulos states. Microsoft's principal product manager for TypeScript, Daniel Rosenwasser, confirmed the collaboration, noting in a Hacker News discussion that "some of what is going to make TS 7.1 faster and leaner … actually comes from optimizations discovered in tsrs." Rosenwasser announced the TypeScript 7.1 beta earlier on the same day, detailing substantial speed and memory improvements.

The Rust port, now part of Cloudflare's Oxc JavaScript toolchain, offers particular advantages for WebAssembly (Wasm). Rust compiles to Wasm without bringing a garbage collector along, reducing overhead in resource-constrained environments. For Cloudflare, this could enable complete development environments to run inside browsers and Workers sandboxes where AI agents write, check, and build applications.

Maintaining compatibility with Microsoft's TypeScript is an acknowledged challenge. Schwenk's team runs TypeScript's conformance tests, deliberately introduces errors into real projects, and uses Rust memory-safety tools. "A faster compiler that finds fewer errors is a broken compiler with good marketing," he wrote. Some discrepancies remain, such as diagnostic message ordering, and Cloudflare plans to apply the same AI-assisted process used in Vinext its Vite-based reimplementation of Next.js to monitor upstream TypeScript and propose fixes.

§

Analysis

Why This Matters

  • Developers using TypeScript could see significantly faster typechecking, especially in large codebases and CI pipelines, reducing wait times and enabling more efficient automation.
  • The Rust port is specifically aimed at helping AI coding agents validate their work concurrently without exhausting memory, potentially accelerating the shift toward AI-assisted software development.
  • Cloudflare's push into Rust-based tooling may encourage broader adoption of Rust in the JavaScript ecosystem and better support for running developer tools in browsers and edge environments.

Background

The tsrs project originated at Owner.com, where a 37,000-file TypeScript backend created resource bottlenecks for AI coding agents. Microsoft had recently rewritten TypeScript's compiler in Go (TypeScript 7.0) to achieve roughly tenfold speed improvements, having earlier considered Rust but concluded it would introduce complications. Cloudflare, which has been building a JavaScript toolchain through its Oxc project and its acquisition of VoidZero, sees Rust as a better fit for its WebAssembly-focused infrastructure. The company is also developing Void, an open platform for deploying AI-built applications.

Key Perspectives

Cloudflare and Owner.com: The Rust port delivers dramatic performance and memory improvements that are critical for AI agent workflows. They stress that tsrs is not a fork and that they are feeding optimizations back to Microsoft's TypeScript team, which has already incorporated some into the TypeScript 7.1 beta. Microsoft (TypeScript team): By collaborating with the tsrs project, Microsoft gains free performance research and testing. Its product manager confirmed that optimisations from tsrs are being used in the official compiler. Microsoft retains ultimate control over the language's design and direction. Critics and skeptics: Questions remain about the reliability of AI-written code and the long-term compatibility of two compiler implementations. Despite good intentions, divergences could accumulate, and the industry will watch whether Cloudflare can keep pace with Microsoft's evolving TypeScript specification.

What to Watch

  • Adoption of tsrs by the wider developer community once it is integrated into developer tools, and whether independent benchmarks confirm the claimed performance gains.
  • Future TypeScript releases from Microsoft: how many of the tsrs optimisations are incorporated and whether performance differences persist.
  • Robustness of the compatibility testing pipeline Cloudflare plans to build: breakdowns could erode trust in the Rust port.

Sources

Checked

12 claims in this story checked against 1 source: 8 supported.

Show each claim
  1. SupportedCloudflare says tsrs is up to eight times faster than TypeScript 7.0.The New Stack: “Cloudflare’s director of engineering Christoph Nakazawa confirmed that the company is taking ownership of tsrs, a Rust port of TypeScript that it claims is up to eight times faster”
  2. SupportedCloudflare says tsrs uses 70 percent less memory than TypeScript 7.0.The New Stack: “and uses 70% less memory than TypeScript 7.0.”
  3. SupportedNakazawa said, “We are not forking TypeScript, we are working with the TypeScript team.”The New Stack: ““We are not forking TypeScript — we are working with the TypeScript team and as a result 7.1 is already ~2.5x faster, too,” Nakazawa writes .”
  4. SupportedAI agents wrote the initial tsrs code.The New Stack: “He would direct the experiment and evaluate the results, leaving the implementation entirely to AI agents.”
  5. SupportedCloudflare’s blog says TypeScript’s team should remain in control of the language’s design and direction.The New Stack: ““To be clear, we are not forking TypeScript. We believe the TypeScript team should remain in full control of the language’s design and direction.””
  6. SupportedSchwenk’s “I wrote zero code. Not ‘barely any’. Zero.” quote is accurate.The New Stack: ““I wrote zero code,” Schwenk writes. “Not ‘barely any’. Zero.””
  7. Not in the sourcesRosenwasser confirmed the collaboration between Microsoft and Cloudflare.The New Stack: “Commenting in a Hacker News discussion about the Rust port, Daniel Rosenwasser, Microsoft’s principal product manager for TypeScript, notes that “a lot of the speed does not just come down to language choice,” adding that “some of what is going to make TS 7.1 faster and leaner… actually comes from optimizations discovered in tsrs.””
  8. SupportedThe tsrs project began just last month at Owner.com.The New Stack: “the tsrs project began just last month at restaurant software company Owner.com”
  9. Partly supportedTsrs runs 2.5 to five times faster than Microsoft’s Go compiler while using about a third as much memory.The New Stack: “across more than a dozen public projects, Schwenk reports tsrs running 2.5 to five times faster than Microsoft’s newer Go compiler nightly, while using about a third as much memory.”
  10. SupportedRosenwasser said some TS 7.1 speed and memory improvements came from optimizations discovered in tsrs.The New Stack: ““some of what is going to make TS 7.1 faster and leaner… actually comes from optimizations discovered in tsrs.””
  11. Not in the sourcesRust compiles to WebAssembly without bringing a garbage collector along.The New Stack: “Go can compile to Wasm, but it has to bring its garbage collector along. Rust offers more direct control over memory, reducing the overhead of running development tools in resource-constrained environments.”
  12. Partly supportedThe Rust port could enable complete development environments to run inside browsers and Workers sandboxes.The New Stack: “For Cloudflare, that could make it easier to run complete development environments inside browsers and isolated Workers sandboxes”

Zotpaper

Written by Harper Lane on the Tech & AI desk. Claims checked by Ines Fairley, verification. Edited by Angus Burke, chief sub. Plate by Ollie Flash, picture desk.

1 source8 of 12 claims matched to a sourcefirst published updated once
Meet the newsroomHow we workSubscribe