GitHub replaced the TypeScript/Node.js implementation of its Copilot agent runtime with more than 800,000 lines of production Rust, and Anthropic rewrote Bun’s 535,496‑line Zig codebase into Rust. Both migrations were driven primarily by AI coding agents, showing that large‑scale language switches can be completed faster and with far fewer dedicated engineers than traditional approaches.
Scale and approach of the rewrites
GitHub’s effort involved 128 incremental pull requests merged over roughly 14.5 weeks. A single developer coordinated the work while the rest of the team continued to add features to the runtime. The company reports that the same scope of work would have required a full team for one to two years before agents were available.
Anthropic’s Bun migration tackled a half‑million‑line Zig codebase in a parallel fashion. Multiple Claude Code agents operated simultaneously, and after eleven days the Rust version passed Bun’s existing test suite on all six supported platforms. The rewrite was merged quickly, with additional cleanup continuing after the initial integration.
Agent‑driven development workflow
Both projects relied on their own AI coding products: GitHub used the Copilot app and Copilot CLI, while Anthropic employed pre‑release Claude models. The agents generated most of the new Rust code, while human engineers performed review, regression testing, and intervention when the agents produced incorrect or incomplete output. The key difference was timing: GitHub chose a slow, incremental rollout that kept the product live, whereas Anthropic performed a rapid, bulk translation before merging.
Architectural, operational, and security considerations
- Language choice. Moving to Rust introduces stronger memory‑safety guarantees, which can reduce runtime crashes and leaks that were observed in the original Zig implementation.
- Incremental vs. bulk migration. An incremental PR‑by‑PR approach allows continuous delivery and early detection of regressions, but extends the overall calendar. A bulk translation can finish faster but requires a comprehensive test suite to catch widespread issues before merge.
- Testing coverage. Both teams depended on existing automated tests to validate the Rust output across multiple platforms. Practitioners should ensure test suites are exhaustive before trusting AI‑generated rewrites.
- Human oversight. Agents produced the bulk of the code, yet engineers still needed to monitor output, resolve failures, and perform final code reviews. This suggests a hybrid model rather than a fully automated rewrite.
- Operational impact. The GitHub migration continued shipping new features during the rewrite, demonstrating that large language changes can coexist with ongoing development if managed incrementally.
Related CloudNinjas coverage: AI engineering.
What This Means For Practitioners
Engineers considering a language migration should evaluate whether an AI‑assisted approach can reduce staffing and timeline constraints. Key steps include:
- Confirm that a robust, platform‑wide test suite exists to validate AI‑generated code.
- Choose an incremental rollout if continuous delivery is required; otherwise, a parallel bulk translation may be faster.
- Plan for dedicated human review cycles to catch logical errors, security regressions, or performance regressions introduced by the agents.
- Assess the cost and availability of the required AI coding agents, as both projects relied on proprietary tools from the same vendor.
- Monitor post‑migration metrics for memory safety, crash rates, and performance to verify the expected benefits of Rust.


