Skip to content
agentusehub
Sign in+ Submit
Rewrite a runtime from TypeScript to Rust with agents

Rewrite a runtime from TypeScript to Rust with agents

GitHub engineers used Copilot tools to have agents write most of an 800,000-line Rust rewrite of the Copilot runtime across 128 PRs, fixing a few regressions.

Read the experience
Time saved
Not reported
Setup time
Not reported
Running cost
Not reported
Cost range
Not reported

Use case overview

“Rewrite a runtime from TypeScript to Rust with agents” is a Software & DevOps AI agent workflow from Any. It connects GitHub Copilot in 3 steps.

GitHub engineers used Copilot tools to have agents write most of an 800,000-line Rust rewrite of the Copilot runtime across 128 PRs, fixing a few regressions.

Reported experience

  1. What they did

    One developer, Stephen Toub, used the Copilot app and CLI to port the runtime in place, one component per PR. Each PR replaced TypeScript with a thin shim into Rust and kept the existing end-to-end tests running. Parent sessions spawned child sessions, each in its own worktree, plus subagents. He checked results, challenged decisions and enforced quality gates.

  2. How it went

    The runtime became 100% Rust, about 832,000 production lines, across 128 PRs in roughly 14.5 weeks. A few regressions were fixed quickly, and the post says performance improved by orders of magnitude.

  3. Worth knowing

    Fifteen concurrent agents building at once froze his laptop. He fixed it by letting only the parent build, then by making a chat session hand out build permission one session at a time.

Example prompts

Try with GitHub Copilot
I want to migrate [module or component] in [owner/repo] from [current language] to [target language]. First write a plan that splits the work into small, independently reviewable pull requests, and show it to me before starting. Then work through them one at a time, with each PR passing the existing tests, and list any behavior differences you find.

Frequently asked questions

What does the “Rewrite a runtime from TypeScript to Rust with agents” workflow do?

GitHub engineers used Copilot tools to have agents write most of an 800,000-line Rust rewrite of the Copilot runtime across 128 PRs, fixing a few regressions.

Which tools do I need?

You need GitHub Copilot.

How long does it take to set up?

The guide walks through 3 steps, starting with “What they did”.

Add this badge to your site

Built this workflow? Show it is featured on AgentUseHub with a live upvote count that links back here. About badges

Featured on AgentUseHub