Back to News
Tools

GitHub Ports 800,000 Lines of Copilot Runtime to Rust in 14.5 Weeks Using AI-Assisted Rewrite

GitHub Ports 800,000 Lines of Copilot Runtime to Rust in 14.5 Weeks Using AI-Assisted Rewrite
Image: InfoQ

GitHub moved Copilot's backend from TypeScript and Node.js to Rust in under four months, leaning on automated tooling and human review across 128 pull requests.

October 9, 2026 · 2 min read · VintuxAI Newsroom

GitHub has finished moving the Copilot runtime off TypeScript and Node.js and onto Rust, a migration covering more than 800,000 lines of code that took roughly 14.5 weeks. The company kept shipping Copilot releases throughout the transition rather than freezing development for a big-bang cutover. The work is one of the largest publicly described production rewrites to lean on AI-assisted tooling at every stage.

Instead of rewriting the service from scratch, the team moved it piece by piece. New Rust components were wired into the existing Node.js process through N-API, Node's native addon interface, so both runtimes could coexist while the old code was retired incrementally. That approach let GitHub swap out hot paths first and verify behavior against the live service before deleting anything.

Automated testing carried much of the correctness burden. The migration relied on test suites to confirm that translated code matched the behavior of the TypeScript original, with human reviewers checking the output before it merged. The entire effort landed as 128 pull requests, a relatively small number given the volume of code involved, which suggests large mechanically-generated changes were grouped into reviewable batches rather than dribbled out line by line.

Rust has become a common target for teams trying to cut memory use and latency in high-traffic services, and Copilot's runtime sits directly in the request path for every code completion it serves. Moving off Node.js removes the event-loop and garbage-collection overhead that shows up under sustained load. For GitHub, the payoff is measured in throughput per machine and predictable tail latency rather than a new user-facing feature.

The detail likely to draw the most scrutiny from engineering teams is the timeline. Rewriting 800,000 lines in 14.5 weeks works out to a pace that would be implausible for hand-written code, and GitHub attributes it to AI-assisted translation paired with automated tests as the safety net. That combination — model-generated ports validated by existing test coverage — is emerging as the template other large codebases may follow.

What GitHub has not said publicly is how much of the translated code needed manual correction, how performance changed in production numbers, or whether the same method would work on code with thinner test coverage. Those gaps matter, because the approach depends on having a reliable oracle to check generated code against. Teams weighing a similar port should watch for follow-up benchmarks and for whether GitHub open-sources any of the migration tooling.

Written in-house by the VintuxAI newsroom, in our own words. The story was first reported by InfoQ.