Urgent.News

What's breaking now, across thousands of outlets.

Tech

Migrating the GitHub Copilot runtime to Rust, using Copilot

A rewrite this size wasn't affordable before agents. Here's what porting the Copilot agent runtime to 800,000 lines of production Rust actually took. The post Migrating the GitHub Copilot runtime to Rust, using Copilot appeared first on The GitHub Blog .

Migrating the GitHub Copilot runtime to Rust, using Copilot

The GitHub Copilot CLI, app, and SDK all rely on a runtime that can be embedded into applications and services. Originally written in TypeScript on Node.js, the runtime grew rapidly and remained on the same stack. However, it has now been completely rewritten in Rust, using more than 800,000 lines of production code across 128 pull requests.

This rewrite significantly improved performance while the team continued to expand the runtime’s capabilities. The Copilot agent runtime is used in various Microsoft, GitHub, and ecosystem solutions, such as VS Code, Visual Studio, Copilot Code Review, and more. These solutions initially implemented their own agent loops but have since adopted the GitHub Copilot SDK, enabling them to focus on core business value while leaving technical details to the runtime.

The shift to Rust was necessary due to the runtime's nature. Originally built as a terminal UI with a mixed architecture, the runtime struggled with performance, reliability, and memory consumption in different environments. The CLI and runtime were also intertwined, requiring significant overhauls to separate layers. The new Rust implementation addresses these issues, providing a more efficient and reliable runtime for various users, including developers working in C#, Python, Go, Java, and Rust.

Written by urgent.news from GitHub Blog's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at github.blog →

More in Tech

More from Thursday 17 September →