Rust is tier-1 language at Microsoft
Rust is tier-1 language at Microsoft
Rust 在微软正式成为一级编程语言
By now it’s no surprise that Rust is of strategic importance to Microsoft. From bold mission statements when Azure CTO Mark Russinovich outlined our future strategy for native code, to millions of dollars invested by Microsoft into supporting the Rust Project, over the following years. Watch Mark’s keynote from last year’s RustConf to get a glimpse of some of our core projects powered by Rust.
如今,Rust 对微软具有战略重要性已不再是什么新闻。从 Azure 首席技术官 Mark Russinovich 在阐述我们原生代码未来战略时发表的大胆使命宣言,到微软在随后几年里投入数百万美元支持 Rust 项目,这一切都有迹可循。观看 Mark 在去年 RustConf 上的主题演讲,可以一窥我们部分由 Rust 驱动的核心项目。
Today, Rust sits among C++, C#, and TypeScript as one of the best-supported languages for internal development at Microsoft. This “Tier-1 language” engineering status for Rust means giving internal teams a paved path from local development to production: secure toolchain builds, productive developer tooling, quality workflows, deep platform integration, and compliance with the SDL requirements Microsoft software must meet.
今天,Rust 与 C++、C# 和 TypeScript 一起,成为微软内部开发中支持力度最好的语言之一。Rust 获得这种“一级语言(Tier-1 language)”的工程地位,意味着微软为内部团队提供了一条从本地开发到生产环境的“铺设路径”:包括安全的工具链构建、高效的开发工具、高质量的工作流、深度的平台集成,以及符合微软软件必须满足的 SDL(安全开发生命周期)要求。
The Windows platform and MSVC have co-evolved for decades, as C and C++ have been the building blocks of our dev platform. As MSVC and Windows develop innovations, we need to ensure that these features and functionality are available across both C++ and Rust, and that we have seamless interoperability between them. MSVC is the native platform compiler for Windows, and Rust needs to participate fully in that ecosystem as its usage grows across Microsoft: from firmware and drivers, kernel and hypervisors, to microservices and apps. This is extremely important in hybrid Rust/C++ projects. One of our most important investments towards this goal is rustc_codegen_utc.
Windows 平台与 MSVC 共同演进了数十年,C 和 C++ 一直是我们开发平台的基石。随着 MSVC 和 Windows 的不断创新,我们需要确保这些特性和功能在 C++ 和 Rust 中都能使用,并确保两者之间具有无缝的互操作性。MSVC 是 Windows 的原生平台编译器,随着 Rust 在微软内部的使用范围从固件、驱动程序、内核、虚拟机管理程序扩展到微服务和应用程序,Rust 需要全面参与到该生态系统中。这对于混合使用 Rust 和 C++ 的项目至关重要。为了实现这一目标,我们最重要的投资之一就是 rustc_codegen_utc。
Introducing rustc_codegen_utc
介绍 rustc_codegen_utc
rustc_codegen_utc is an alternative code generation backend for rustc, in the same architectural family as rustc_codegen_llvm, rustc_codegen_gcc and rustc_codegen_cranelift. It plugs into the same backend interface and connects rustc’s shared compiler machinery to the MSVC backend (aka “UTC“). It participates in a broader platform ecosystem strategy to support: High compatibility with the Windows tooling eco-system and ABI; Binary hardening and code security features; Post-link compliance, analysis, and servicing (including Hotpatch); Seamless Rust/C++ interop for hybrid projects; Cross-language inlining, optimization, and SPGO (Sample Profile Guided Optimization); Debugging and crash-dump analysis; Profiling, diagnostics, and coverage.
rustc_codegen_utc 是 rustc 的一个替代代码生成后端,与 rustc_codegen_llvm、rustc_codegen_gcc 和 rustc_codegen_cranelift 属于同一架构家族。它接入相同的后端接口,将 rustc 的共享编译器机制连接到 MSVC 后端(即“UTC”)。它参与了一项更广泛的平台生态系统战略,以支持:与 Windows 工具生态系统和 ABI 的高度兼容;二进制加固和代码安全特性;链接后的合规性、分析和服务(包括热补丁);混合项目中无缝的 Rust/C++ 互操作;跨语言内联、优化和 SPGO(基于样本配置文件的引导优化);调试和崩溃转储分析;以及性能分析、诊断和覆盖率测试。
These capabilities and workflows have been built over many years with the MSVC tech-stack. Connecting rustc to that backend lets Rust build on the same platform investment, with perfect compatibility out of the box, rather than requiring a parallel implementation of every Windows-specific能力. The result is a unified code generation platform for Rust and C++ on Windows.
这些能力和工作流是多年来基于 MSVC 技术栈构建的。将 rustc 连接到该后端,使 Rust 能够建立在相同的平台投资之上,实现开箱即用的完美兼容,而无需为每一项 Windows 特有功能进行并行实现。其结果是为 Windows 上的 Rust 和 C++ 提供了一个统一的代码生成平台。
Native platform evolution for Rust and C++
Rust 和 C++ 的原生平台演进
Production software at Microsoft moves through extensive security and quality workflows. Rust has become a Tier-1 language at Microsoft, but C++ still dominates after decades of development. Using a unified codegen platform will minimize both maintenance and evolution costs for us. MSVC and Windows continue to innovate. New code generation capabilities, security features, diagnostics, and servicing technologies are added all the time. With rustc_codegen_utc, those investments land on a common foundation for both C++ and Rust.
微软的生产级软件需要经过广泛的安全和质量工作流。Rust 虽然已成为微软的一级语言,但 C++ 在经过几十年的发展后依然占据主导地位。使用统一的代码生成平台将最大限度地降低我们的维护和演进成本。MSVC 和 Windows 持续创新,新的代码生成能力、安全特性、诊断和服务技术不断被添加。有了 rustc_codegen_utc,这些投资将落脚于 C++ 和 Rust 的共同基础之上。
That matters operationally because it reduces duplicated engineering, but it also matters strategically: Rust participates directly in Microsoft’s Windows-native engineering ecosystem. This is especially valuable for hybrid Rust/C++ projects, and many systems will use both languages for years to come. A shared backend creates the foundation for both sides of those systems to participate equally in all development workflows. This alignment is one of the main reasons rustc_codegen_utc exists. It allows Rust to meet the engineering expectations of the environment where Microsoft teams already build, validate, diagnose, and service Windows software.
这在运营层面很重要,因为它减少了重复的工程工作;但在战略层面同样重要:Rust 直接参与了微软的 Windows 原生工程生态系统。这对于混合 Rust/C++ 项目尤为宝贵,许多系统在未来几年内都将同时使用这两种语言。共享后端为这些系统的双方平等参与所有开发工作流奠定了基础。这种对齐是 rustc_codegen_utc 存在的主要原因之一。它使 Rust 能够满足微软团队在构建、验证、诊断和维护 Windows 软件时所期望的工程标准。
A stronger Rust and C++ interop foundation
更强大的 Rust 和 C++ 互操作基础
On other platforms, if a hybrid Rust/C++ project builds its C++ code with Clang, both languages can already reach the same LLVM code generation platform. rustc_codegen_utc creates the same shared-backend opportunity for Windows-native C++ projects where MSVC is the native platform compiler. Codegen, platform quirks, ABI, EH and post-link tooling are only half of the interop challenge. High-fidelity language-level interop, FFI contracts, bindings, language semantics differences… and build systems are just some of the problems that we’re working on internally and across the industry.
在其他平台上,如果一个混合 Rust/C++ 项目使用 Clang 构建其 C++ 代码,那么这两种语言已经可以达到相同的 LLVM 代码生成平台。rustc_codegen_utc 为那些以 MSVC 为原生平台编译器的 Windows 原生 C++ 项目创造了同样的共享后端机会。代码生成、平台特性、ABI、异常处理(EH)和链接后工具只是互操作挑战的一半。高保真的语言级互操作、FFI 合约、绑定、语言语义差异以及构建系统,只是我们正在内部和整个行业中努力解决的部分问题。
Rollout as part of the Microsoft Rust Paved Path
作为微软 Rust“铺设路径”的一部分进行推广
rustc_codegen_utc has been a major investment by a dedicated team in Microsoft DevDiv and has been production-ready since early 2026. It has been self-hosted since Rust 1.90 and is part of a broader internal Rust platform that includes secure supply-chain builds of rustc, standard library, associated tools, integration with local development, production pipelines and common quality & compliance workflows in our engineering systems. More than 100 Microsoft project repositories build with it today. This rollout continues each week as more repositories adopt it. This is part of a sustained investment in the full engineering lifecycle for Rust at Microsoft: acquisition, tooling, quality, security, platform integration, production.
rustc_codegen_utc 是微软 DevDiv 一个专门团队的重大投资项目,自 2026 年初以来已具备生产就绪能力。它自 Rust 1.90 版本以来已实现自托管,并成为更广泛的内部 Rust 平台的一部分,该平台包括 rustc 的安全供应链构建、标准库、相关工具、与本地开发的集成、生产流水线以及我们工程系统中通用的质量与合规工作流。目前,已有超过 100 个微软项目仓库使用它进行构建。随着越来越多的仓库采用它,推广工作每周都在持续进行。这是微软对 Rust 全工程生命周期持续投资的一部分,涵盖了获取、工具、质量、安全、平台集成和生产等各个环节。