마이크로소프트가 GitHub Copilot의 기반이 되는 런타임을 TypeScript에서 Rust로 완전히 이전했으며, 이식 작업의 대부분을 AI 에이전트가 수행했습니다. 토큰 비용 약 12만 달러와 개발자 3주치 시간만으로 43만 줄 TypeScript를 80만 줄 프로덕션 Rust 코드로 변환했고, 벤치마크에서 최대 15.9배의 속도 향상과 메모리 90% 절감을 달성했습니다.
번역된 본문
GitHub Copilot과 점점 더 많은 마이크로소프트 제품을 뒷받침하는 소프트웨어 엔진이 이제 완전히 Rust로 작성되었으며, 이식 작업의 대부분은 AI 에이전트가 수행했다. 이 전환에는 AI 토큰 사용 비용 약 12만 달러와 개발자 약 3주치의 시간이 소요되었다. 다만 관리자들은 결과 코드에서 수십 건의 회귀(regression) 문제를 해결해야 했는데, 이는 Rust를 이해하는 데 있어 AI가 여전히 겪는 어려움을 보여준다.
이 작업은 런타임을 모듈 단위로 갱신하며 진행되었고, 14.5주에 걸쳐 135개 이상의 릴리스가 나왔다. 하루 평균 약 1.3건의 이식 풀 리퀘스트가 열렸다. 전체적으로 에이전트는 43만 줄의 TypeScript를 80만 줄의 프로덕션 Rust 코드로 변환했다. 이식을 최대한 단순하게 유지하기 위해 TypeScript 모듈을 사례별로 교체하는 방식만 사용했으며, 런타임 자체의 구조 최적화는 시도하지 않았다. 그 작업은 다음 단계로 남아 있다.
그리고 간결한 성능으로 유명한 Rust는 기대를 저버리지 않았다. 하나의 벤치마크는 공유 클라이언트와 100개의 동시 파이프라인을 사용해 런타임이 1,000개의 단일 턴 세션 라이프사이클을 얼마나 빨리 완료하는지 측정했다. 원래 TypeScript 구현은 초당 7.55개의 라이프사이클을 완료했지만, 인프로세스(in-process)로 실행된 Rust는 초당 120개를 처리해 해당 워크로드에서 15.9배의 속도 향상을 기록했다. 메모리 측면에서는 에이전트 10개 클라이언트 배치가 TypeScript에서 1,383MB를 소비한 반면, Rust로 다시 작성된 버전은 동일한 에이전트 무리를 처리하는 데 126MB만 사용했다. Rust 내에서 작업은 완료를 위해 외부 백그라운드 프로세스를 생성하는 대신 인프로세스로 유지되었는데, 이는 TypeScript에서 필수적이었던 요구사항이다.
VS Code부터 마이크로소프트 오피스까지
언뜻 보면 대부분의 사용자는 Copilot 런타임이 얼마나 광범위하게 퍼져 있는지 알지 못할 수 있다. 이 런타임은 GitHub Copilot CLI(명령줄 인터페이스), Copilot 앱, SDK, GitHub Copilot 클라우드 에이전트를 지원한다. VS Code, Visual Studio, Excel, Outlook, PowerPoint 그리고 수많은 다른 마이크로소프트 클라우드 서비스에도 등장한다.
원래 이 런타임은 TypeScript로 작성되어 Node.js를 프레임워크로, V8을 실행 엔진으로 사용했다. TypeScript와 Node는 빠른 개발에는 탁월했지만, 대규모로 사용될 때는 빠른 시작 속도와 서버 밀도 제공에서 한계를 보였다.
"이것이 모든 대형 TypeScript 프로그램이 Rust가 되어야 한다는 주장이 결코 아니다. 우리의 요구사항은 C ABI를 통한 임베딩, 낮은 시작 및 정상 상태 오버헤드, 예측 가능한 리소스 사용을 강조했다. Rust가 이런 목표를 가능하게 했다"고 마이크로소프트의 저명한 엔지니어(Distinguished Engineer) 스티븐 투브(Stephen Toub)가 전체 과정을 설명하는 글에서 밝혔다.
이 프로젝트는 Copilot을 사용해 Copilot을 다시 작성한 것으로, 각 LLM의 강점에 따라 작업의 서로 다른 부분을 실행하기 위해 GPT-5.6 Sol과 Claude Opus 4.8 등 여러 LLM이 활용되었다.
박식하지만 수다스러운 에이전트들
투브는 에이전트 사용을 대체로 성공적이라고 평가했다. 실제로 이 프로젝트를 사람이 수동으로 했다면 수년이 걸리고 수백만 달러의 비용이 들었을 것이다. 투브는 에이전트가 몇 가지 놀라운 창발적 행동을 보였다고 언급했다. 그중 하나는 실제로 코드를 작성하는 것보다 정보 수집에 훨씬 더 많은 시간을 보냈다는 점이다.
"AI가 코드를 쏟아내는 대중적인 이미지는 거의 반대다. 이 규모에서 작업은 오히려 반복적인 조사, 현재 상태 검토, 가설 수립, 표적화된 변경, 이 과정의 반복에 훨씬 가까워 보였다"고 그는 썼다. 또 다른 놀라움은 에이전트가 얼마나 자주…
devops Microsoft agentically ports Copilot runtime to Rust for $120K The Rust compiler remains unperturbed by the antics of the LLM Joab Jackson Joab Jackson SOFTWARE DEVELOPMENT AND CLOUD REPORTER Published fri 18 Sep 2026 // 22:11 UTC READ MORE Virginia governor wakes up to fact datacenters have become political cancer 1 day ago Compsci grads facing recession-like job prospects thanks to AI 1 day ago Claude Code revamps projects so you can work and pay in parallel 1 day ago FBI: Fake cop and government impersonation scams cost victims $1.6B 1 day ago Admins, you've been warned: The clock is ticking on Edge's IE Mode 1 day ago The software engine underpinning GitHub Copilot and a growing number of Microsoft products is now written entirely in Rust, with AI agents doing most of the porting work. The migration cost about $120,000 in AI token usage plus about three weeks of a developer's time. However, managers also had to grapple with a few dozen regressions in the resulting code, pointing to AI’s ongoing challenges in understanding Rust. The effort updated the runtime module-by-module until the job was completed, spanning over 135 releases across a 14.5-week time period. Roughly 1.3 port pull requests were opened per day. REG AD Overall, agents converted 430,000 lines of TypeScript into 800,000 lines of production Rust. To keep the port as simple as possible, the port only replaced TypeScript modules on a case-by-case basis. It didn’t look to optimize the structure of the runtime itself. That work is next. REG AD And Rust, known for its lean performance, did not disappoint. One benchmark measured how quickly the runtime could complete 1,000 one-turn session lifecycles, using a shared client and 100 concurrent pipelines. The original TypeScript implementation completed 7.55 of those lifecycles per second, while Rust running in-process managed 120 per second - representing a 15.9x speedup on that particular workload. In terms of memory, a 10-client batch of agents consumed 1,383 MB with TypeScript while the Rust rewrite consumed only 126 MB serving the same swarm. Within Rust, the work remained in-process instead of spawning external background processes for completion, a requirement for TypeScript. Copilot from VS Code to Microsoft Office At first glance, most users may not know how pervasive the Copilot runtime is. It backs the GitHub Copilot command-line interface (CLI), the Copilot app , the SDK and the GitHub Copilot cloud agent . It shows up in VS Code, Visual Studio, Excel, Outlook, PowerPoint, and innumerable other Microsoft cloud services. Originally, the runtime was written in TypeScript and used Node.js as the framework and V8 for the execution engine. TypeScript and Node were ace for rapid development, but when used at scale, they suffered in terms of providing fast start-up and server density. “This is in no way a claim that every large TypeScript program should become Rust. Our requirements emphasized embedding through a C ABI, low startup and steady-state overhead, and predictable resource use. Rust made those goals possible,” wrote Microsoft Distinguished Engineer Stephen Toub in a post that explained the entire process . The project used Copilot to rewrite Copilot, which in turn used several LLMs – GPT-5.6 Sol and Claude Opus 4.8 were both namechecked – to execute different parts of the job, depending on each LLM’s natural strength. REG AD Well-read but chatty agents Toub assessed the use of agents as largely successful. Indeed, this project would have taken years and cost millions if done by hand. Agents showed several surprising emergent behaviors, Toub noted. For one, they spent far more time gathering information than actually writing code. “The popular image of AI spewing code is almost backwards; at this scale, the work looked much more like iterative investigation, inspecting the current state, forming a hypothesis, making a targeted change, rinsing and repeating,” he wrote. Another surprise was how frequently sessions interacted with other sessions, either those they spawned or other ones entirely. One of the thorniest conversions was the session.ts file, which was over 30,000 lines of TypeScript that touched all aspects of the runtime. The porting session, which ended up taking 25 hours to complete, began by spending 56 minutes reading the documentation and making 122 tool calls for clarification. It then spawned 15 child sessions, each creating its own worktree and agent. Then, they started communicating with each other. Using a built-in orchestration skill, one session found every other active session and sent messages to those whose missions overlapped, requesting coordination. The compiler is a teacher, not an oracle REG AD Given its performance benefits, Rust has proven to be a popular language for rewriting applications. Bun creator Jarred Sumner, for instance, recently ported the Anthropic-owned JavaScript runtime and toolkit, which contained roughly 535,000 lines of Zig code, over to Rust, almost entirely using Claude agents. As of July 30, the experimental Rust port was passing 99.8 percent of Bun's existing tests on Linux x64 glibc, with the stable releases still shipping from the Zig codebase. That job cost $165,000 in tokens. But there are hidden dangers in using Rust as well, as Toub has found. For an LLM and a lazy programmer alike, if the code compiles, then it is valid Rust. But throughout the process, the project encountered dozens of regressions within the code. A regression is something that used to work, but no longer does after an update. The compiler has no idea, for instance, whether functions are in the right order, whether the job completes at an acceptable cost, whether it meets the developer's unwritten requirements, or whether it is internally coherent at all, for that matter. At RustConf, held in Montréal last week, consultant Lisa Crossman warned about the practice of treating the compiler as an “oracle,” or the last word on whether some Rust code is valid or not. “Rust stops the agent writing memory unsafe code; it does not stop the agent writing the wrong program correctly,” she said. If they’re wise, a human developer treats the compiler as a teacher, decoding the errors as a path to a better understanding of the language’s domain. An LLM, on the other hand, just uses the compiler as a black box, one it can batter with blunt, inefficient workarounds until one passes muster (perhaps this is what Zig creator Andrew Kelley meant when he called Bun’s Rust code “ unreviewed slop ”). In Toub’s case, he had found that compiler-approved regressions could come from ambiguous semantics and behaviors, branch drift, missing features that weren’t ported over, and differing behaviors from the replacement code. “That’s in no way an argument against Rust’s compiler,” Toub wrote. “But ‘if it compiles, it’s correct’ is useful only as a joke.” ® ai rust large language models microsoft devops copilot