Microsoft agentically ports Copilot runtime to Rust for $120K
agents apple copilot microsoft
| Source: HN | Original article
Microsoft employed AI agents to rewrite the Copilot runtime entirely in Rust, completing the migration for a cost of $120,000.
Microsoft has completed a full rewrite of the GitHub Copilot runtime in Rust, using AI agents to perform the bulk of the work. The migration shifted roughly 800,000 lines of production code from TypeScript to 832,378 lines of Rust over a 14‑week effort, at a direct cost of about $120,000 in AI‑model token usage and three weeks of a developer’s time. The resulting Rust engine delivers up to an 18‑fold improvement in in‑process session startup speed and achieved a 96.22 % prompt‑cache hit rate during testing.
The move matters because it demonstrates how generative AI can accelerate large‑scale codebase transformations that were previously deemed too costly or time‑consuming. Rust’s memory‑safety guarantees and performance profile align with Microsoft’s broader push to harden the security and efficiency of its AI‑driven services, including Copilot and other internal tools. At the same time, the project surfaced a handful of regressions—“a few dozen” issues that required manual intervention—highlighting that AI‑generated code still needs human oversight.
The rewrite also feeds into the ongoing debate about AI’s role in software development labor. As we reported on 20 September, Microsoft executives have described AI‑driven code generation as “the largest theft of labor in human history,” a claim that gains nuance when AI can now shoulder the heavy lifting of a multi‑million‑line port for a modest token budget.
Going forward, observers will watch whether Microsoft scales this approach to other legacy components, how it refines tooling to catch regressions earlier, and whether the cost‑benefit calculus holds up across different languages and product lines. The outcome could shape industry expectations for AI‑assisted rewrites and inform policy discussions about the economics of machine‑generated software labor.
Sources
Back to AIPULSEN