Skip to content

Why Rust Is the New GOAT for AI

Read the Portuguese translation →

Author: Better Stack · Watch on YouTube

Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.

Original language: English

Original video: Why Rust Is the New GOAT for AI · Channel: Better Stack · 01:34 · Watch on YouTube

Topics: AI agents, Software engineering with AI, AI developer tools

The video describes Rust’s growing role in AI and developer tools, citing its use in projects including xAI’s codebase, GitHub Copilot, Bun, and OpenAI’s Code CLI. GitHub’s Copilot runtime port replaced a TypeScript-and-Node approach with a Rust file that applications can load directly, reducing session startup and response time from over five seconds to under 300 milliseconds. The video also says Copilot’s agents wrote most of the Rust port in about 14.5 weeks, with compiler feedback helping them fix errors.

  • Elon Musk replied “Rust” to a 2023 tweet claiming AGI would be built in Python; nearly three years later, he said xAI’s code was mostly Rust.
  • GitHub rewrote the runtime behind Copilot in Rust.
  • The previous TypeScript runtime required apps using Copilot’s SDK to start a separate Node process.
  • Each Node process used about 100 MB of memory at minimum before the application had done anything.
  • The Rust version could be loaded directly into an app’s process and called like a plugin.
  • The reported time to start a session and receive a reply fell from 5.25 seconds to 292 milliseconds.
  • The port changed about 430,000 lines of TypeScript into 832,000 lines of Rust, plus about 470,000 lines of tests.
  • The work took about 14.5 weeks, and Copilot’s own agents wrote most of it.
  • GitHub counted the agents’ compiler errors; Rust’s memory rules accounted for about 1.7% of them.
Start Chapter Summary
00:00 Rust’s growing presence in AI tools The video introduces Rust’s adoption across xAI, GitHub Copilot, Bun, and OpenAI’s Code CLI.
00:32 How the Copilot runtime got faster Replacing a separate Node process with a Rust file loaded directly by the app cut the reported response time to 292 milliseconds.
01:03 Agents, compiler feedback, and the port Copilot agents wrote most of the Rust port in about 14.5 weeks, while the compiler helped them identify errors.

AGI will be built in Python. Let that sink in. — 00:00

GitHub rewrote the runtime behind Copilot in Rust — 00:00

Each of those used about 100 MB of memory at minimum — 00:32

So, that’s how starting a session and getting a reply dropped from 5.25 seconds to 292 milliseconds. — 01:03

caused only about 1.7% of them. — 01:34

Rust, Python, AGI, GitHub, GitHub Copilot, TypeScript, Node.js, Bun, Claude Code, OpenAI, Code CLI, xAI, Elon Musk

00:00 Back in 2023, someone tweeted, “AGI will be built in Python. Let that sink in.” Elon Musk replied with one simple word, “Rust.” Nearly 3 years later, he wrote that xAI’s code is mostly Rust. GitHub rewrote the runtime behind Copilot in Rust, and starting a session and getting one reply went from over 5 seconds to under 300 milliseconds. Bun, the JavaScript runtime that now Claude Code runs on, moved from Zig to Rust this summer, and OpenAI’s Code CLI is now 97% Rust. So, how did Copilot get from 5

00:32 seconds to under 300 milliseconds? The old runtime was written in TypeScript, and every app that uses Copilot through GitHub’s SDK started its own node process to run it. Each of those used about 100 MB of memory at minimum before the application has even done anything. Rust compiles to one 90 file, so there’s nothing extra like a node runtime to install, and instead of starting a second program and sending it messages, each app can load that file straight from its own process and call it directly like a plugin. So, the app doesn’t have to start a whole node

01:03 process, and that’s how starting a session and getting a reply dropped from 5.25 seconds to 292 milliseconds. When an agent writes broken Rust, the compiler points at the line and says what failed. So, the agent fixes it and tries again. That’s how GitHub’s port got done. About 430,000 lines of TypeScript became 832,000 lines of Rust, plus about 470,000 lines of tests. That was completed in about 14 and 1/2 weeks, and Copilot’s own agents wrote most of it. GitHub counted the

01:34 agents’ compiler errors, too, and the memory rules Rust is known for caused only about 1.7% of them.