How to port a runtime to Rust with Copilot
The article reports a completed Rust runtime rewrite across over 135 releases, with workload-specific performance and memory improvements and a few dozen resulting regressions.
Suggested prompt
Suggested prompt written by Agents In Use, not the source author. Replace bracketed inputs and review tool permissions first.
Port [runtime module] from [TypeScript] to [Rust], preserving behavior and avoiding structural redesign. Read [documentation] and inspect dependencies first. Split independent tasks into [separate worktrees], coordinate overlapping changes, and report compatibility failures.
Reach people exploring AI agents
See placements →Evidence at a glance
Sourced account- Source author
- pjmlp
- Original account
- Read the source ↗
- Published
- Source link checked
- Reported result
- The article reports a completed Rust runtime rewrite across over 135 releases, with workload-specific performance and memory improvements and a few dozen resulting regressions.
- Human involvement
- The article says managers dealt with a few dozen regressions but does not describe detailed review gates.
A linked account supports attribution. It does not mean we independently reproduced its result.
Report an issue with this case
Open correction emailOpens your email app with the case link included. Nothing is sent automatically.
How the agent did it
- Replaced TypeScript runtime modules individually with Rust implementations.
- Read documentation and made clarification tool calls for the session.ts conversion.
- Spawned child sessions with separate worktrees and agents.
The supplied article describes Microsoft using Copilot to rewrite the runtime underpinning Copilot products from TypeScript into Rust. The migration proceeded module by module, replacing individual TypeScript components rather than restructuring the entire runtime. Structural optimization was described as future work.
Agents used multiple models, including GPT-5.6 Sol and Claude Opus 4.8, for different parts of the task. The article describes an investigative pattern: inspect the current state, form a hypothesis, make a targeted change, and repeat. One difficult session.ts conversion involved a file exceeding 30,000 lines that touched many runtime components.
That session began with documentation reading and clarification tool calls, then spawned 15 child sessions with separate worktrees and agents. A built-in orchestration skill helped a session locate other active sessions and request coordination where their assignments overlapped.
The article reports a completed conversion of 430,000 TypeScript lines into 800,000 production Rust lines across more than 135 releases. It also reports roughly $120,000 in token usage, about three weeks of developer time, and a few dozen regressions. Reported speed and memory improvements refer to particular benchmark workloads, rather than every runtime operation.
Who it's for: teams evaluating agent-assisted language migrations with substantial cross-module coordination requirements.
Prompt
Suggested prompt (written by Agents In Use, not the author's)
Source: Blog · pjmlp
Frequently asked questions
Did the migration redesign the runtime?
The article says modules were replaced case by case to keep the port simple. Optimizing the runtime structure was left for later.
Were the reported performance gains universal?
No universal gain is stated. The article reports a 15.9-fold improvement for one session-lifecycle benchmark and reduced memory for a particular ten-client batch.
More details
Remaining steps
- Used an orchestration skill to request coordination between overlapping sessions.
About this account
Agents performed most porting work and spawned child sessions that coordinated overlapping assignments through an orchestration skill.
Platform: Blog. Attribution: https://www.theregister.com/devops/2026/09/18/microsoft-agentically-ports-copilot-runtime-to-rust-for-120k/5297549. Prompt: Suggested (written by Agents In Use, not the author's). Sourced by the Agents In Use pipeline.
Credit: pjmlp on Blog
Source published
Added to Agents In Use
Source checked
Tools and topics
GitHub Copilot · Rust · TypeScript · Git worktrees
Rust · Runtime migration · Agent orchestration
Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.