NewsBin 0 discussing
--:--:--
Daily Reset
NewsBin
--:--:--
Until Daily Reset
Mainstream The Register 20 hours ago

Microsoft agentically ports Copilot runtime to Rust for $120K

The migration cost about $120,000 in AI token usage plus about three weeks of a developer's time. However, managers also had to grapple with a few dozen regressions in the resulting code, pointing to AI’s ongoing challenges in understanding Rust.  The effort updated the runtime module-by-module until the job was completed, spanning over 135 releases across a 14.5-week time period. Roughly 1.3 port pull requests were opened per day. Overall, agents converted 430,000 lines of TypeScript into 800,000 lines of production Rust. To keep the port as simple as possible, the port only replaced TypeScript modules on a case-by-case basis. It didn’t look to optimize the structure of the runtime itself. That work is next.  And Rust, known for its lean performance, did not disappoint. One benchmark measured how quickly the runtime could complete 1,000 one-turn session lifecycles, using a shared client and 100 concurrent pipelines. The original TypeScript implementation completed 7.55 of those lifecycles per second, while Rust running in-process managed 120 per second - representing a 15.9x speedup on that particular workload. In terms of memory, a 10-client batch of agents consumed 1,383 MB with TypeScript while the Rust rewrite consumed only 126 MB serving the same swarm. Within Rust, the work remained in-process instead of spawning external background processes for completion, a requirement for TypeScript. Copilot from VS Code to Microsoft Office At first glance, most users may not know how pervasive the Copilot runtime is. It backs the GitHub Copilot command-line interface (CLI), the Copilot app, the SDK and the GitHub Copilot cloud agent. It shows up in VS Code, Visual Studio, Excel, Outlook, PowerPoint, and innumerable other Microsoft cloud services. Originally, the runtime was written in TypeScript and used Node. js as the framework and V8 for the execution engine. TypeScript and Node were ace for rapid development, but when used at scale, they suffered in terms of providing fast start-up and server density.  “This is in no way a claim that every large TypeScript program should become Rust. Our requirements emphasized embedding through a C ABI, low startup and steady-state overhead, and predictable resource use. Rust made those goals possible,” wrote Microsoft Distinguished Engineer Stephen Toub in a post that explained the entire process. The project used Copilot to rewrite Copilot, which in turn used several LLMs – GPT-5.6 Sol and Claude Opus 4.8 were both namechecked – to execute different parts of the job, depending on each LLM’s natural strength.   Well-read but chatty agents Toub assessed the use of agents as largely successful.

Original story by The Register View original source

0 comments
0 people discussing

Anonymous Discussion

Real voices. Real opinions. No censorship. Resets in 5 hours.

No account needed Anonymous • Resets in 5h

Loading comments...

About NewsBin

Freedom of speech first. Anonymous discussion on today's news. All content resets every 24 hours.

No accounts. No tracking. No censorship. Just honest conversation.