GitHub rewrote the Copilot agent runtime in 832,378 lines of Rust in about 14 weeks, and one developer led the port

Image: The GitHub Blog
Why it mattersA rewrite this size, once a multi-team project taking a year or more, was closed by one developer running a Copilot-assisted port, which changes how engineering managers should size language migrations for the next planning cycle.
GitHub said on 16 September that it has finished porting the runtime behind its Copilot coding agent from TypeScript and Node.js to Rust, and that the port ran from 12 May to 21 August 2026, about fourteen and a half weeks, with a single lead developer as the primary contributor and Copilot doing most of the line-by-line writing.
The size of the port
The company says the finished code base is 832,378 lines of production Rust and 468,689 lines of Rust unit tests. It estimated the original TypeScript at about 130,000 lines before the port started; the actual TypeScript ported ended up closer to 430,000 lines, once tests and generated code were counted. The port landed as 128 merged pull requests and 135 versions cut, of which 100 were pre-release and 35 were stable.
GitHub reports the internal Copilot review agent processed 12,760,995 telemetry events and 1,385,214 assistant messages against 31,247 user messages over the porting window. The company says its prompt cache hit rate on this workload reached 96.22 percent, measured as cache reads divided by all input-side token volume. It attributes the number to careful reuse of the same context across the port's small, incremental pull requests, rather than fresh context per file.
What actually changed
The Copilot agent used to run as a Node.js process that other GitHub services called through JSON-RPC over a subprocess boundary. The Rust rewrite is a native binary with a C ABI so that the same agent can be embedded in-process by six language SDKs, listed in the post as C#, TypeScript, Python, Rust, Go and Java. GitHub says the runtime is now "orders of magnitude" faster, but the post gives no specific numbers for latency, memory, or startup time, and the reader should treat that phrase as a vendor claim until an independent benchmark exists.
The safety surface is smaller than a raw Rust port would suggest. GitHub says all 158 remaining unsafe blocks sit at external interop points, meaning the C ABI, Windows API calls, and POSIX calls, rather than inside its own logic.
How Copilot fits in
The post says a single developer led the port and that Copilot wrote most of the code, with humans deciding architecture, reviewing each pull request against the original TypeScript line by line, and gating merges on a CI validation step called the "build gate". The team ran a custom Copilot review agent that diffed the ported Rust against the source TypeScript on every change, on top of the normal test suite. GitHub's argument is that this loop, not raw model capability, is what made a large port affordable: it lets one person keep an entire language migration coherent, at a scale that would have needed a team a year ago.
An engineering manager sizing a language migration for the next planning cycle should read this as a data point on what one developer plus a well-instrumented AI review loop can now cover in a quarter, rather than as a general claim that all rewrites are cheap. The numbers here are for a single service with a stable interface and a working end-to-end test suite. A port without those preconditions is still expensive.
Source
Migrating the GitHub Copilot runtime to Rust, using Copilot, The GitHub Blog, 16 September 2026.
Source: The GitHub Blog
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually shipping with them. Short, and only when there is something worth reading.

