Microsoft agentically ports Copilot runtime to Rust for $120K
Recorded: Sept. 20, 2026, 11 a.m.
| Original | Summarized |
Microsoft agentically ports Copilot runtime to Rust for $120K Jump to main content Search TOPICS Security All Security Cyber-crime Patches Research CSO Off-Prem All Off-Prem Edge and IoT Channel PaaS and IaaS SaaS On-Prem All On-Prem Systems Storage Networks HPC Personal Tech Cx0 Public Sector Software All Software AI and ML Applications Databases DevOps OS Platforms Virtualization Offbeat All Offbeat Columnists Science BOFH Legal Site News About Us Special Features All Special Features VMware Explore 2026 Cloud Infrastructure Month 2026 HPE: AI Explainers Agentic AI The Future of the Datacenter AWS:Reinvent Nvidia GTC Supercomputing Month Computex 2026 AI Infrastructure Month 2026 The State of Storage 2026 RSA Conference Vendor Voice All Vendor Voice Modernizing Financial Services with FIS and AWS Barco Infinidat Everpure Rubrik Make it real with Capgemini and AWS Money Movement Hub ZTE Nutanix: Scale Kubernetes. Not Chaos. AWS New Horizon Digicert Netscout Resources Intelligence Webinars & Events Newsletters Search Sign in AI Security Software Microsoft Developer Open Source BOFH Who, Me? On Call Science REG AD devops
Microsoft agentically ports Copilot runtime to Rust for $120K The Rust compiler remains unperturbed by the antics of the LLM Joab Jackson Joab SOFTWARE DEVELOPMENT AND CLOUD REPORTER Published READ MORE Virginia governor wakes up to fact datacenters have become political cancer Compsci grads facing recession-like job prospects thanks to AI Claude Code revamps projects so you can work and pay in parallel FBI: Fake cop and government impersonation scams cost victims $1.6B Admins, you've been warned: The clock is ticking on Edge's IE Mode The software engine underpinning GitHub Copilot and a growing number of Microsoft products is now written entirely in Rust, with AI agents doing most of the porting work.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 OfficeAt 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 agentsToub assessed the use of agents as largely successful. Indeed, this project would have taken years and cost millions if done by hand. Agents showed several surprising emergent behaviors, Toub noted. For one, they spent far more time gathering information than actually writing code. “The popular image of AI spewing code is almost backwards; at this scale, the work looked much more like iterative investigation, inspecting the current state, forming a hypothesis, making a targeted change, rinsing and repeating,” he wrote. Another surprise was how frequently sessions interacted with other sessions, either those they spawned or other ones entirely. One of the thorniest conversions was the session.ts file, which was over 30,000 lines of TypeScript that touched all aspects of the runtime. The porting session, which ended up taking 25 hours to complete, began by spending 56 minutes reading the documentation and making 122 tool calls for clarification. It then spawned 15 child sessions, each creating its own worktree and agent. Then, they started communicating with each other.Using a built-in orchestration skill, one session found every other active session and sent messages to those whose missions overlapped, requesting coordination.The compiler is a teacher, not an oracle Given its performance benefits, Rust has proven to be a popular language for rewriting applications. Bun creator Jarred Sumner, for instance, recently ported the Anthropic-owned JavaScript runtime and toolkit, which contained roughly 535,000 lines of Zig code, over to Rust, almost entirely using Claude agents. As of July 30, the experimental Rust port was passing 99.8 percent of Bun's existing tests on Linux x64 glibc, with the stable releases still shipping from the Zig codebase.That job cost $165,000 in tokens. But there are hidden dangers in using Rust as well, as Toub has found. For an LLM and a lazy programmer alike, if the code compiles, then it is valid Rust.But throughout the process, the project encountered dozens of regressions within the code. A regression is something that used to work, but no longer does after an update. The compiler has no idea, for instance, whether functions are in the right order, whether the job completes at an acceptable cost, whether it meets the developer's unwritten requirements, or whether it is internally coherent at all, for that matter.At RustConf, held in Montréal last week, consultant Lisa Crossman warned about the practice of treating the compiler as an “oracle,” or the last word on whether some Rust code is valid or not. “Rust stops the agent writing memory unsafe code; it does not stop the agent writing the wrong program correctly,” she said. If they’re wise, a human developer treats the compiler as a teacher, decoding the errors as a path to a better understanding of the language’s domain. An LLM, on the other hand, just uses the compiler as a black box, one it can batter with blunt, inefficient workarounds until one passes muster (perhaps this is what Zig creator Andrew Kelley meant when he called Bun’s Rust code “unreviewed slop”). In Toub’s case, he had found that compiler-approved regressions could come from ambiguous semantics and behaviors, branch drift, missing features that weren’t ported over, and differing behaviors from the replacement code. “That’s in no way an argument against Rust’s compiler,” Toub wrote. “But ‘if it compiles, it’s correct’ is useful only as a joke.” ® ai REG AD Agentic security is the billion-dollar challenge for some clever startup to solve High time to stop kicking the security can down the road, investor tells The Reg AI boom could leave an e-waste trail that wraps 6 times around Earth Report says estimates focused on GPUs miss the mountains of power, cooling, and networking gear destined for scrap HPE makes its “unified storage” claim real as B10000 R6 hits GA PARTNER CONTENT: Pairs block and adjacent file workloads with independent scaling of performance and capacity Firefox 156 arrives with a forest of forks in its wake From Waterfox to LibreWolf and Pale Moon, there's a browser for almost every Mozilla dissenter COLUMNISTS Open weights are not open source: Why AI's favorite label is under dispute Downloading a model is increasingly easy. Understanding how it was made, or changing a system at its root, is another matter Anthropic decides to support OpenAI's markdown instructions spec Devs cheer relief from compatibility headache TOP STORIES SAAS Salesforce staggers back to feet after global outage databases Oracle celebrates banner quarter with another round of layoffs cyber-crime Revolut falls for fake government requests, hands over customer data ai and ml Ex-FTC boss Khan urges Uncle Sam to break out the handcuffs for AI CEOs, citing 1934 precedent software Fedora 45 beta drags the Linux console into the 21st century security Security through obscurity is dead, and AI delivered the fatal blow AI Microsoft agentically ports Copilot runtime to Rust for $120K Virginia governor wakes up to fact datacenters have become political cancer Compsci grads facing recession-like job prospects thanks to AI Claude Code revamps projects so you can work and pay in parallel FBI: Fake cop and government impersonation scams cost victims $1.6B Infosec Security Security Black Hat and DEF CON Security Malware Month FOSS KDE turns 30 and someone's brought an AI-native desktop proposal Shopify extends lifeline to Tailwind as vibe coding erodes web dev platform's bottom line Switzerland tests a FOSS escape route from Microsoft 365 Feel peak Windows was 7? You might like Kumander Linux Canonical shuttering some of its legacy chat channels Audacity audio-editing app no longer looks like it's from the early 2000s Biting the hand that feeds IT About Us Contact usAdvertise with usWho we areNewsletter Our Websites The Next PlatformDevClassBlocks and FilesSituation Publishing Your Privacy Cookies PolicyPrivacy PolicyTs & CsDo not share my personal informationYour Consent Options Archives27 years of articles Copyright. All rights reserved © 1998-2026. |
Microsoft agentically migrated the Copilot runtime to the Rust programming language, a process that cost approximately $120,000 in AI token usage and roughly three weeks of developer time. This effort involved agents handling the bulk of the porting work, and despite this automation, managers encountered numerous regressions in the final code, which demonstrated the ongoing challenges found by AI agents in fully comprehending the nuances of the Rust language. The migration spanned over 135 releases across a fourteen point five week period, with approximately 430,000 lines of TypeScript being converted into 800,000 lines of production Rust code, achieving this by replacing TypeScript modules on a case-by-case basis without optimizing the core runtime structure. The decision to use Rust was motivated by its inherent qualities, which aligned with the requirements for embedding, low startup times, minimal steady-state overhead, and predictable resource utilization, facilitated by a C Application Binary Interface. The original runtime was built using TypeScript with Node.js as the framework and the V8 engine. Performance benchmarks indicated that the Rust implementation proved significantly faster and more efficient for this workload. Specifically, the Rust runtime managed 120 one-turn session lifecycles per second, representing a fifteen point nine times speedup compared to the TypeScript implementation's 7.55 lifecycles per second. Furthermore, in terms of memory consumption, a batch of ten agents using Rust consumed only 126 megabytes, compared to 1,383 megabytes for the equivalent TypeScript implementation, while maintaining in-process execution, a feature required by the original design. The process highlighted emergent behaviors among the AI agents, including spending considerable time on information gathering rather than direct code generation, and developing sophisticated coordination skills by interacting across different sessions to ensure overlapping missions were addressed. This complexity was seen in the conversion of the session files, which required agents to read documentation, initiate tool calls for clarification, spawn multiple child sessions, and establish inter-session communication to coordinate tasks. Regarding the compiler's role, the experience suggests that treating the compiler as an infallible oracle is misleading; regressions arose from ambiguous semantics and differing behaviors rather than errors in the compiler itself. The author suggests that human developers act as teachers, interpreting compiler errors to deepen their understanding of the language, whereas LLMs often treat the compiler as a black box, relying on inefficient workarounds until the code passes muster, which may result in suboptimal outcomes. |