
Developer Uses AI Agents to Port TypeScript Compiler to Rust, Claiming It Outruns Microsoft's Go Rewrite
Developer Theo Browne used AI agents to port Microsoft's TypeScript compiler to Rust. He claims TS_Rust runs twice as fast as Microsoft's Go rewrite and could enable lighter agent environments via V8.
AI agents complete a Rust port of TypeScript
Developer and YouTuber Theo Browne used AI agents to port Microsoft's TypeScript compiler, type checker, and language server to Rust. The project, called TS_Rust, is published on GitHub and is said to pass the TypeScript conformance tests with nearly 100 percent accuracy.
Browne claims the Rust port runs twice as fast as Microsoft's official Go-based TypeScript rewrite, version 7, and 12.5 times as fast as the previous TypeScript version 6. He also says he has not even inspected the resulting code.
A $24,000 run after an earlier failed attempt
Browne first tried the rewrite using OpenAI's GPT-5.6 Sol and GPT-6 Astra. That effort consumed more than $400,000 worth of API-equivalent tokens and reached roughly 84 percent compatibility before the models struggled to finish the remaining work.
When Anthropic released Claude Opus 5.5 last month, Browne revisited the idea. The model produced a working implementation using about $24,000 worth of API-equivalent tokens through his Claude subscriptions. Rather than translating JavaScript directly to Rust, Claude ported Microsoft's Go implementation to Rust, copying a few bugs from the original along the way.
Browne only learned about that strategy after someone else pointed it out. In a video presentation he said writing all of TypeScript from JavaScript to Rust would not have been viable, and that his agents followed the same approach the Microsoft team took from TypeScript to Go.
A lighter runtime for AI agents
Beyond the novelty, a Rust-based TypeScript compiler could make it possible to run some agentic workloads inside Google's V8 engine instead of a full virtual machine or container. Browne argues this would be difficult with Microsoft's Go implementation because Go's garbage collector must be bundled into the runtime using WebAssembly, while Rust does not need a garbage collector and compiles more efficiently with WebAssembly.
Cloudflare already isolates multiple user environments using the Google V8 JavaScript runtime, saving hundreds of megabytes per customer environment. In theory, a lightweight agentic environment could run within V8 using TS_Rust and an in-memory shell such as Vercel's Just Bash.
The work fits a wider trend. Microsoft recently rewrote the Copilot runtime in Rust for about $120,000, and Google's Gemini 4 Argon model is being used to port major C and C++ codebases, including RE2, libgav1, and parts of Fuchsia's Zircon kernel, to Rust.
Sources: The Register
SiTech — AI-powered web development
We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.