The runtime behind GitHub Copilot, which powers the assistant in Visual Studio Code, Visual Studio, Excel, Outlook and other programs, now runs on Rust instead of TypeScript. AI agents did the port while Microsoft engineers supervised.

The 430,000 lines of TypeScript became 800,000 lines of Rust. The work took 14 and a half weeks and produced more than 135 releases, at roughly 1.3 pull requests a day.

The bill

Tokens cost $120,000. Human effort came to about three weeks. The agents ran on GPT-5.6 Sol and Claude Opus 4.8.

The payoff

In one benchmark of a thousand short sessions, the TypeScript version handled 7.55 sessions per second and the Rust version 120, nearly 16 times faster. With 10 agents running at once, TypeScript needed 1,383 MB of memory and Rust 126 MB.

Microsoft does not present this as a general rule. "This is in no way a claim that every large TypeScript program should become Rust," says Stephen Toub, a Microsoft Distinguished Engineer. He says the requirements stressed embedding through a C ABI, low overhead and predictable resource use.

Rough edges

The port also produced dozens of regressions: code that compiled but did not behave correctly. Toub says the saying "if it compiles, it's correct" works only as a joke.

Consultant Lisa Crossman made a similar point at RustConf. "Rust stops the agent writing memory unsafe code; it does not stop the agent writing the wrong program correctly," she said.