GitHub has rewritten the shared agent runtime behind Copilot from TypeScript and Node.js into more than 800,000 lines of production Rust—and used Copilot agents to do most of the porting.
The migration is unusually useful as a coding case study because GitHub published concrete engineering numbers rather than a benchmark demo. In the primary engineering account, Microsoft Distinguished Engineer Stephen Toub says roughly 430,000 lines of production TypeScript passed through the migration before the runtime reached 832,378 lines of production Rust and 468,689 lines of Rust unit tests.
Copilot rewrote the engine that runs Copilot
The runtime sits beneath the GitHub Copilot CLI, Copilot app and Copilot SDK. GitHub wanted a native component that could be embedded in-process, expose a C ABI to multiple language front ends and avoid forcing every SDK consumer to carry Node.js and V8.
GitHub summarized the project in a public post: one primary engineer working with a fleet of coding agents shipped more than 800,000 lines of production Rust while maintaining the live product.
Why Rust replaced TypeScript
TypeScript was not portrayed as a bad language. GitHub’s problem was architectural. The original runtime grew out of a terminal application built on Node.js, V8, Ink and React. SDK consumers in C#, Python, Go, Java and Rust could end up spawning a separate CLI process just to host the agent loop.
GitHub wanted lower startup overhead, lower steady-state memory use, predictable resource consumption, clean in-process embedding and straightforward interoperability across six SDK languages. Rust fit those requirements while also offering a native toolchain and stronger compile-time safety guarantees.
This is an important distinction for developers: GitHub explicitly says the project is not evidence that every large TypeScript application should be rewritten in Rust. The language decision followed the runtime’s specific deployment constraints.
128 pull requests instead of one giant rewrite
The migration avoided a big-bang cutover. GitHub replaced components incrementally on the main branch, using interoperability shims between the remaining TypeScript and new Rust pieces. The port landed across 128 pull requests during roughly fourteen and a half weeks while the product continued shipping.
During that window, GitHub shipped 135 CLI releases—100 prereleases and 35 stable releases. That let engineers expose smaller batches of migrated code, correlate regressions with recent changes and fix failures without waiting for an all-or-nothing rewrite.
That incremental strategy complements a broader trend BitcoinVersus.Tech has been following: coding agents are becoming modular, with specialized skills and subagents increasingly able to divide large software jobs into bounded tasks.
The performance difference was enormous—but workload-specific
One GitHub benchmark ran 1,000 one-turn session lifecycles with a shared client and 100 concurrent pipelines. The TypeScript implementation completed 7.55 lifecycles per second; the in-process Rust runtime completed 120 per second, about 15.9× higher throughput on that test.
Memory also fell sharply in another published comparison. A ten-client batch consumed 1,383 MB under the TypeScript implementation versus 126 MB for the Rust implementation. Those numbers should not be generalized into a universal Rust-versus-TypeScript benchmark: the redesign also removed process boundaries and the Node/V8 runtime overhead that had been part of the original architecture.
The Register independently highlighted the same engineering results, including the 15.9× benchmark improvement and the project’s roughly ₿1.38 ($120,000) attributed AI-token cost, using a contemporaneous Bitcoin price of about $86,682 per BTC.
The agents did not simply “translate” the repository
The more interesting coding lesson is how the agents worked. GitHub’s telemetry showed enormous amounts of reading, searching, testing and coordination around the actual edits. Agents spawned subagents, worked in separate worktrees, inspected existing behavior and repeatedly used compiler and test feedback to converge on compatible implementations.
That resembles the evaluation problem explored in BitcoinVersus.Tech’s coverage of SWE-Game testing whether coding agents can build playable games: producing code is only one part of software engineering. The output still has to preserve behavior under real workloads.
Rust’s compiler caught errors—not intent
The port also produced dozens of known regressions, which GitHub says had been fixed by September 14. The failures included incomplete migrations, lifetime and state errors, behavioral mismatches, host-boundary problems and incorrect test assumptions.
That is the warning embedded inside an otherwise impressive project. Memory safety and a strict compiler can eliminate entire classes of mistakes, but compiling successfully does not prove that a program implements the intended behavior. Agents still need tests, observability, code review and human judgment.
A real-world test of agentic software engineering
The Copilot rewrite is more meaningful than another code-generation benchmark because the target was a production runtime being actively developed and released. Agents were not asked to solve isolated interview problems. They had to preserve contracts, coordinate across components, work around moving code and survive continuous deployment.
It also gives context to projects such as Unity exposing specialized game-development skills to coding agents. The direction is moving from autocomplete toward orchestrated software work: agents that inspect repositories, delegate tasks, run tools, test changes and iterate against failures.
The key number may not be 800,000 lines. It is that a large, continuously shipping production migration could be decomposed into 128 incremental pull requests while agents handled much of the implementation work. That is a different model of coding—one where the engineer increasingly designs the migration, constraints, tests and review loop while fleets of agents execute pieces of the plan.
BitcoinVersus.Tech
Advertisement
Editor’s Note
We volunteer daily to ensure the credibility of the information on this platform is Verifiably True. If you would like to support to help further secure the integrity of our research initiatives, please donate here: 3C9o19EH5HSiwEPyCTmEKzxhNCbo2X6TTb
BitcoinVersus.tech is not a financial advisor. This media platform reports on financial subjects purely for informational purposes.

Leave a comment