Developer Theo Browne spent about $24,000 in API-equivalent tokens to have AI agents port Microsoft's TypeScript compiler to Rust. The project, called TS_Rust, started as a way to burn excess tokens on a task that seemed impossible. After earlier models stalled at 84 percent compatibility, Anthropic's Claude Opus 5.5 finished the job, passing TypeScript's conformance tests and producing a working drop-in replacement.

Browne says the Rust port runs twice as fast as Microsoft's official Go-based TypeScript rewrite and 12.5 times as fast as the previous TypeScript version. Notably, the AI model did not translate directly from JavaScript. Instead, it ported Microsoft's Go implementation to Rust, copying a few bugs along the way. Browne only learned of this strategy after someone else pointed it out.

The practical benefit, Browne argues, is that a Rust-based TypeScript compiler could run agentic workloads inside Google's V8 engine without needing a full virtual machine or Docker container. Microsoft's Go implementation is a poor fit for V8 because Go's garbage collector must be bundled into WebAssembly, while Rust compiles more efficiently. Cloudflare already uses V8 to isolate customer environments, and a lightweight setup using TS_Rust plus an in-memory shell could cut compute costs.

Browne remains surprised the project worked at all. "These types of YOLO projects should not be viable at all," he said, noting that the result works as a drop-in replacement. The experiment is one of several recent AI-driven rewrites to Rust, including Microsoft's Copilot runtime and Google's porting of C/C++ codebases, suggesting that AI agents are becoming practical for large-scale compiler engineering.