<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-github-used-ai-to-port-copilot-from-typescript-to-rust-in-record-time-5rhgld40z" -->

---
title: How GitHub Used AI to Port Copilot From TypeScript to...
description: GitHub ported the Copilot runtime from TypeScript to Rust, rewriting roughly 430K lines of production code with one main developer using Copilot app, Copilot...
canonical: https://daily.dev/posts/how-github-used-ai-to-port-copilot-from-typescript-to-rust-in-record-time-5rhgld40z
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How GitHub Used AI to Port Copilot From TypeScript to Rust in Record Time | daily.dev
og:description: GitHub ported the Copilot runtime from TypeScript to Rust, rewriting roughly 430K lines of production code with one main developer using Copilot app, Copilot...
og:url: https://daily.dev/posts/how-github-used-ai-to-port-copilot-from-typescript-to-rust-in-record-time-5rhgld40z
og:image: https://api.daily.dev/og/posts/5RHgLD40Z.png
og:image:alt: How GitHub Used AI to Port Copilot From TypeScript to Rust in Record Time
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How GitHub Used AI to Port Copilot From TypeScript to Rust in Record Time

**[ByteByteGo](https://daily.dev/sources/bytebytego)** · 13 min read · 0 upvotes · 0 comments

## Summary

GitHub ported the Copilot runtime from TypeScript to Rust, rewriting roughly 430K lines of production code with one main developer using Copilot app, Copilot CLI, and AI agent fleets over a few months. The switch removed the need to run Node and V8 inside the runtime. In one trial, creating a client, completing a turn, and cleaning up dropped from 5.25 seconds to 292 milliseconds, an almost 18x speedup. Throughput rose from 7.55 to 120 session lifecycles per second, and peak memory for 10 clients fell from 1383 MB to 126 MB. The AI token spend for the port was about $120K across 136 billion tokens, not counting developer time.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.bytebytego.com/p/how-github-used-ai-to-port-copilot>

## Questions this post answers

### How much faster was GitHub Copilot's runtime after porting it from TypeScript to Rust?

Creating a client, completing a single turn, and cleaning up dropped from 5.25 seconds to 292 milliseconds, about 18 times faster. Throughput for many sessions sharing one client rose from 7.55 to 120 completed session lifecycles per second. Peak private memory increase in a 10-client test fell from 1383 MB to 126 MB, since the Rust runtime no longer needs to initialize Node and V8.

_Weighing a Rust rewrite for latency-sensitive services? daily.dev surfaces real migration benchmarks like this one._

### How did GitHub use AI agents to port 430K lines of TypeScript to Rust?

A coordinating agent investigated large components, then split the work across child sessions with separate Git branches, each handling an independent piece. For one 30K-line file, the coordinating agent spent an hour analyzing it before dividing work among 15 child sessions, assigning models per task, then merging completed changes into its own branch. Builds were bottlenecked to one at a time to avoid overloading the developer's laptop.

_Exploring multi-agent workflows for large refactors? daily.dev tracks real-world agent-fleet orchestration patterns like this._

### What did GitHub's AI-driven TypeScript to Rust port of Copilot cost?

The entire migration cost around $120,000 in AI token costs, covering roughly 136 billion tokens, with most of that volume made up of cached input that reduced the cost of repeatedly processing existing context. A single main developer completed the bulk of the roughly 430,000-line port in a few months, with other developers contributing to integrations, packaging, and reviews.

_Budgeting an AI-assisted rewrite? daily.dev keeps cost and token benchmarks like this one in view._

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#github](https://daily.dev/tags/github), [#typescript](https://daily.dev/tags/typescript), [#rust](https://daily.dev/tags/rust)

[View this post on daily.dev](https://daily.dev/posts/how-github-used-ai-to-port-copilot-from-typescript-to-rust-in-record-time-5rhgld40z)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How GitHub Used AI to Port Copilot From TypeScript to Rust in Record Time","url":"https://daily.dev/posts/how-github-used-ai-to-port-copilot-from-typescript-to-rust-in-record-time-5rhgld40z","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-github-used-ai-to-port-copilot-from-typescript-to-rust-in-record-time-5rhgld40z"},"datePublished":"2026-11-10T16:37:54.305Z","dateModified":"2026-11-10T16:39:32.824Z","description":"GitHub ported the Copilot runtime from TypeScript to Rust, rewriting roughly 430K lines of production code with one main developer using Copilot app, Copilot...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/01ee31727a73bf548ba6a338346d0831?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/01ee31727a73bf548ba6a338346d0831?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"ByteByteGo","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ByteByteGo","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/35be29234ee14d01a9cd049c52e12753","url":"https://daily.dev/sources/bytebytego"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-github-used-ai-to-port-copilot-from-typescript-to-rust-in-record-time-5rhgld40z","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,github,typescript,rust","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ByteByteGo","item":"https://daily.dev/sources/bytebytego"},{"@type":"ListItem","position":3,"name":"How GitHub Used AI to Port Copilot From TypeScript to Rust in Record Time"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-github-used-ai-to-port-copilot-from-typescript-to-rust-in-record-time-5rhgld40z#faq","mainEntity":[{"@type":"Question","name":"How much faster was GitHub Copilot's runtime after porting it from TypeScript to Rust?","acceptedAnswer":{"@type":"Answer","text":"Creating a client, completing a single turn, and cleaning up dropped from 5.25 seconds to 292 milliseconds, about 18 times faster. Throughput for many sessions sharing one client rose from 7.55 to 120 completed session lifecycles per second. Peak private memory increase in a 10-client test fell from 1383 MB to 126 MB, since the Rust runtime no longer needs to initialize Node and V8. Weighing a Rust rewrite for latency-sensitive services? daily.dev surfaces real migration benchmarks like this one."}},{"@type":"Question","name":"How did GitHub use AI agents to port 430K lines of TypeScript to Rust?","acceptedAnswer":{"@type":"Answer","text":"A coordinating agent investigated large components, then split the work across child sessions with separate Git branches, each handling an independent piece. For one 30K-line file, the coordinating agent spent an hour analyzing it before dividing work among 15 child sessions, assigning models per task, then merging completed changes into its own branch. Builds were bottlenecked to one at a time to avoid overloading the developer's laptop. Exploring multi-agent workflows for large refactors? daily.dev tracks real-world agent-fleet orchestration patterns like this."}},{"@type":"Question","name":"What did GitHub's AI-driven TypeScript to Rust port of Copilot cost?","acceptedAnswer":{"@type":"Answer","text":"The entire migration cost around $120,000 in AI token costs, covering roughly 136 billion tokens, with most of that volume made up of cached input that reduced the cost of repeatedly processing existing context. A single main developer completed the bulk of the roughly 430,000-line port in a few months, with other developers contributing to integrations, packaging, and reviews. Budgeting an AI-assisted rewrite? daily.dev keeps cost and token benchmarks like this one in view."}}]}
```

