AI
GitHub and Anthropic deploy AI agents to tackle massive Rust migrations—with opposite strategies
Two tech giants used coding agents to rewrite hundreds of thousands of lines into Rust, but chose radically different approaches to managing the transformation.
The New Stack
Major technology companies are increasingly turning to Rust to gain memory safety and performance advantages, and now the use of AI-powered coding agents is reshaping how these large-scale rewrites are executed. GitHub recently announced that it completely refactored its Copilot runtime—originally written in TypeScript atop Node.js—into over 800,000 lines of production Rust, using its own Copilot agents to drive the effort.
According to engineer Stephen Toub, the undertaking would have required "a whole team of developers a year or two" using traditional methods. Instead, a single developer handled most of the work in just a few months, allowing the rest of the engineering team to continue shipping new features. The migration unfolded gradually across 128 pull requests, letting the team identify and resolve problems incrementally as code landed.
Two paths, similar destinations#
Though both GitHub and Anthropic saw AI agents as essential to making large-scale rewrites economically viable, they took markedly different routes. Bun—the JavaScript runtime that Anthropic acquired last year—faced a different pressure: its 535,496-line Zig codebase was leaking memory and crashing, forcing developer Jarred Sumner to seek a permanent solution rather than endless bug fixes. He orchestrated multiple Claude instances working in parallel to simultaneously translate different parts of Bun into Rust. The converted code passed all platform tests within eleven days, though additional polish continued afterward.
GitHub's approach was slower but less disruptive. Rather than pausing product development for a massive all-at-once rewrite, it spread the effort over roughly 14.5 weeks, merging Rust pieces into the main codebase as they were completed while continuing to ship improvements and fixes.
The economic calculus remains consistent across both efforts: agent-assisted rewrites have made projects previously considered too expensive or time-consuming newly feasible.
Industry pattern emerging#
The trend extends beyond these two marquee examples. Meta engineer Joe Savona led a Rust migration of the React Compiler in March, describing it as "majority coded by AI," while preserving architecture and strategy decisions for human judgment. OpenAI disclosed that two engineers, working with Codex and GPT-5.5, rewrote Habitat—its storage service backing ChatGPT—from Python to Rust in mid-2026, achieving a sixfold CPU reduction and 15-fold memory savings while handling 95% of production traffic.
These individual projects share a common thread: Rust adoption was already accelerating among companies rethinking legacy systems, and coding agents are now positioned as the linchpin making migrations that were previously too costly or disruptive worth attempting.

