A $24,000 AI Experiment Ports the TypeScript Compiler to Rust
Summary
Developer and YouTuber Theo Browne used AI agents to port Microsoft's TypeScript compiler, type checker, and language server from Go to Rust. The experiment cost about $24,000 in API-equivalent Claude subscription usage after earlier attempts with OpenAI models consumed more than $400,000 worth of tokens and reached about 84 percent compatibility. Browne says the new implementation passed TypeScript conformance tests with nearly 100 percent accuracy, although he initially did not inspect the generated code. Claude succeeded partly by changing the strategy: instead of translating TypeScript directly from JavaScript, it ported Microsoft's existing Go rewrite, inheriting some of its bugs. Browne says the Rust version could be more suitable for WebAssembly and Google's V8 runtime because Rust does not require a garbage collector, unlike the Go implementation's WebAssembly setup. That could eventually let some TypeScript-based agent workloads run in lighter environments instead of virtual machines or containers, though the article presents this as a possibility requiring further work. The project is part of a broader wave of AI-assisted software rewrites, but its reported performance and compatibility claims come from Browne rather than an independent evaluation.