Agents In Use
What’s new todayLast update
499 additions

How to port a runtime to Rust with Unknown

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.

TRY A BOUNDED VERSION

Prompt to try

Editorial adaptation, not the source author’s exact prompt. 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.

What happened

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.

Reported by pjmlp on Blog

How the agent did it

  1. Replaced TypeScript runtime modules individually with Rust implementations.
  2. Read documentation and made clarification tool calls for the session.ts conversion.
  3. Spawned child sessions with separate worktrees and agents.

Where a person stepped in

The article says managers dealt with a few dozen regressions but does not describe detailed review gates.

A person approved each step before the agent continued.

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

  1. 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 20 Sept 2026

Source checked 14 Oct 2026

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.