the short version
- The headline $120,000 is token spend only; the human cost was about three weeks of a developer's time spread across a 14.5-week calendar window.
- A clean Rust compile did not prevent a few dozen regressions, which Toub traced to ambiguous semantics, branch drift, unported features and differing replacement behaviour.
- The hardest module, a 30,000-line session.ts, took a single 25-hour session that spent 56 minutes reading documentation, made 122 tool calls and spawned 15 child sessions with their own worktrees.
- The sources do not report per-module human review time, so the review line item in any comparable migration budget remains an unknown.
Microsoft has finished porting the software engine underpinning GitHub Copilot from TypeScript to Rust, with AI agents doing most of the work. The port cost about $120,000 in AI token usage plus about three weeks of a developer's time, spread across a 14.5-week period and more than 135 releases, converting 430,000 lines of TypeScript into 800,000 lines of production Rust at roughly 1.3 port pull requests per day. It also produced a few dozen regressions in code that compiled. What the sources do describe per module is the harness: the thorniest file ran as a single 25-hour agent session that spawned 15 child sessions, each with its own worktree. What they do not describe is how much human review time each module consumed.
The runtime backs the GitHub Copilot command-line interface, the Copilot app, the SDK and the GitHub Copilot cloud agent, and it shows up in VS Code, Visual Studio, Excel, Outlook, PowerPoint and other Microsoft cloud services. It was originally written in TypeScript, using Node.js as the framework and V8 as the execution engine, which The Register reports were good for rapid development but suffered at scale on start-up time and server density. Microsoft Distinguished Engineer Stephen Toub, who wrote up the process, framed the requirements narrowly rather than as a general argument for Rust.
This is in no way a claim that every large TypeScript program should become Rust. Our requirements emphasized embedding through a C ABI, low startup and steady-state overhead, and predictable resource use. Rust made those goals possible.
Microsoft's port cost $120,000 in tokens
The published figures are token spend and elapsed time, not a loaded cost. $120,000 across 800,000 lines of shipped Rust works out to about $0.15 per line of output, or about $0.28 per line of TypeScript input. At roughly 1.3 port pull requests per day over 14.5 weeks, that is around 130 port PRs if the rate is counted in calendar days - the source does not say - or something close to $900 of tokens per merged PR. Those are arithmetic conveniences, not reported metrics, but they are the shape of number a budget owner needs.
The performance case is reported concretely. One benchmark measured how quickly the runtime completed 1,000 one-turn session lifecycles using a shared client and 100 concurrent pipelines: the TypeScript implementation completed 7.55 lifecycles per second, the Rust build running in-process managed 120, a 15.9x speedup on that workload. A 10-client batch of agents consumed 1,383 MB under TypeScript and 126 MB under Rust serving the same swarm. Part of that comes from the Rust version keeping completion work in-process rather than spawning external background processes, which TypeScript required.
One discipline kept the cost containable: the port replaced TypeScript modules on a case-by-case basis and did not try to optimise the structure of the runtime itself. The Register reports that work is next, which means the $120,000 buys a functional translation, not an idiomatic Rust codebase.
What the harness had to do per module
The project used Copilot to rewrite Copilot, routing parts of the job to different LLMs depending on each model's natural strength; GPT-5.6 Sol and Claude Opus 4.8 were both namechecked. The behaviour Toub flagged as surprising is the part that matters for harness design: agents spent far more time gathering information than writing code.
The popular image of AI spewing code is almost backwards; at this scale, the work looked much more like iterative investigation, inspecting the current state, forming a hypothesis, making a targeted change, rinsing and repeating.
The worst module shows what that costs. session.ts was over 30,000 lines of TypeScript that touched all aspects of the runtime. Its porting session ran 25 hours: 56 minutes reading the documentation, 122 tool calls for clarification, then 15 child sessions spawned, each creating its own worktree and agent. Using a built-in orchestration skill, one session found every other active session and sent messages to those whose missions overlapped, requesting coordination. A harness that cannot give each agent an isolated checkout, cannot let sessions discover and message each other, and cannot survive a 25-hour run will not reproduce this result at this price.
That requirement list rhymes with what Will Larson describes at Imprint: roughly ten local workspaces, each with an independent checkout of every repository, so agents operate at the workspace level rather than the repository level and can generate cross-repository pull requests. On top of that sits an orchestrated harness they call Agent Fleet for work that runs independently of a laptop. His observation is that the pieces compound only to the extent you have the other pieces - his goal-tracking loop depends on Datadog MCP and Snowflake access, which depends on Linear being the single source of state for the company's work.
The compiler is a teacher, not an oracle
A clean compile was not evidence of a correct port, which is why the regression count is the most important number in the report. Toub traced compiler-approved regressions to four causes: ambiguous semantics and behaviors, branch drift, missing features that were never ported over, and replacement code behaving differently from the original. At RustConf in Montréal, consultant Lisa Crossman warned against treating the compiler as an oracle on whether Rust code is valid.
Rust stops the agent writing memory unsafe code; it does not stop the agent writing the wrong program correctly.
The Register's framing is that a human developer reads compiler errors as a path to understanding the domain, while an LLM treats the compiler as a black box to batter with blunt workarounds until one passes. Toub's version is blunter: "'if it compiles, it's correct' is useful only as a joke." The comparable project is Bun creator Jarred Sumner's port of the Anthropic-owned JavaScript runtime and toolkit, roughly 535,000 lines of Zig, to Rust almost entirely using Claude agents. That cost $165,000 in tokens, and as of July 30 the experimental Rust port was passing 99.8 percent of Bun's existing tests on Linux x64 glibc, with stable releases still shipping from the Zig codebase. Zig creator Andrew Kelley called that Rust code "unreviewed slop."
The verification layers you have to budget separately
If the compiler is not the gate, something else has to be. One commenter on Hacker News relayed a claim from a developer on the Copilot team that the work shipped incrementally across 128 PRs with existing end-to-end tests run against the new code at every step, and that the totals are 832,378 lines of production Rust plus roughly 469,000 lines of unit tests, about 1.30 million lines combined. Treat that as an unverified relay: the 832,378 figure does not match the 800,000 The Register reports, and no source confirms the unit-test count.
Iouri Khramtsov's layered model is a usable checklist for what those gates cost. He runs seven layers: getting requirements right through spec-driven development with an AI pass that hunts for gaps, edge cases and unexpected interactions; unit tests above 95 percent coverage, with test cases written before the implementation; manual testing by a human; extensive automated end-to-end tests; dedicated AI code quality passes that add 5 to 15 minutes to implementation time; PR reviews by both humans and AI, with another agent pruning the AI comments that are not meaningful; and production monitoring and alerting. His throughput numbers are the relevant ones for a migration model: the layers let his output increase 2-3x, and manual testing is the step that has seen only modest productivity gains and the main reason it is not 10x.
Applied to a port, the implication is that the token line is not the expensive line. Existing end-to-end tests are the cheapest oracle available, because they encode the old behaviour the translation is supposed to preserve. A legacy codebase without them has to pay for that migration first.
What practitioners are pushing back on
The 30,000-line session.ts drew the most heat. Commenters on Hacker News read it as evidence the runtime was itself vibe-coded; others pushed back with counterexamples, citing the .NET garbage collector as a single C++ file that ran to 30,000 or 50,000-plus lines until it was split, depending on which commenter you believe, and Android's View.java at around 34,000 lines of human-written code. The sources do not resolve the provenance question either way.
The 430,000-to-800,000 line expansion also drew scepticism, with one commenter guessing the extra 400,000 lines are comments the agents added to everything. Nothing in the reporting on Toub's account explains the ratio. The sharpest technical objection is about the benchmark: one commenter argued that well-optimised JavaScript could approach the unoptimised Rust port's numbers, and that getting to idiomatic Rust will take ten times the effort of the module-by-module conversion because idiomatic code has little to do with a plain translation. Toub's stated requirements were embedding through a C ABI, low startup and steady-state overhead, and predictable resource use rather than raw throughput, and the sources do not report whether an optimised Node.js build was evaluated against those.
What is still unreported
The cost model has holes. No source gives per-module human review time, the split of the $120,000 across GPT-5.6 Sol and Claude Opus 4.8, or how many of the few dozen regressions reached users rather than being caught in the end-to-end suite. There is no breakdown of what the three weeks of developer time went on - triage, review, or unblocking stuck sessions. The restructuring phase, where idiomatic Rust and the real performance ceiling live, has not been costed at all.
For a team costing a similar migration, the defensible reading is this: token spend is roughly $0.15 per line of shipped code and is the smallest line item. The prerequisites are an end-to-end test suite that already encodes current behaviour, a harness that can give each agent its own worktree and let sessions coordinate across 25-hour runs, and a human review budget sized for compiler-clean regressions rather than compile errors. The Register's report asserts the same work by hand would have taken years and cost millions; the article does not say how that estimate was derived, and it is the number every migration proposal will quote.
Questions this raises
how much did Microsoft's Rust port of the Copilot runtime cost
About $120,000 in AI token usage, plus roughly three weeks of a developer's time, spread over a 14.5-week period and more than 135 releases. That works out to about $0.15 per line of the 800,000 lines of Rust shipped, or roughly $900 of tokens per merged port pull request if the 1.3 PRs per day rate is counted in calendar days.
did the Rust port introduce bugs even though it compiled
Yes. Stephen Toub reported a few dozen regressions in code that compiled cleanly, traced to four causes: ambiguous semantics and behaviors, branch drift, features that were never ported, and replacement code behaving differently from the original. His summary was that 'if it compiles, it's correct' is useful only as a joke.
how much faster is the Rust Copilot runtime than the TypeScript one
On a benchmark of 1,000 one-turn session lifecycles using a shared client and 100 concurrent pipelines, TypeScript completed 7.55 lifecycles per second and the in-process Rust build managed 120, a 15.9x speedup on that workload. A 10-client batch of agents used 1,383 MB under TypeScript versus 126 MB under Rust.
These daily notes are drafted by a model I run and operate myself - the same kind of pipeline this site is about - from sources published in the previous 24 hours, and every one lists what it read. The longer essays, the talks and the preprint are mine, written by hand.
