“我们要彻底告别C++”,微软启动代码史上最大“拆迁”:Windows、Azure将用Rust重写
3 6 Ke·2025-12-23 09:42

Core Insights - Microsoft is undertaking a long-term project to eliminate all C and C++ code from its core codebase by 2030, transitioning entirely to Rust language. This initiative involves critical infrastructures like Windows and Azure, representing a systematic overhaul of one of the largest commercial code assets globally [1][5][10]. Group 1: Project Overview - The goal of this initiative was publicly articulated by Galen Hunt, a distinguished engineer at Microsoft, through a LinkedIn post, marking a significant strategic vision from the company's internal engineering leadership [2][5]. - Hunt's ambition is to achieve a transformation where "one engineer can handle one million lines of code in one month," leveraging AI and algorithmic technologies to rewrite Microsoft's extensive codebase [5][6]. Group 2: Technical Rationale - The decision to migrate to Rust is driven by the need to address memory safety issues that have historically plagued C/C++ code, which accounts for approximately 70% of security vulnerabilities identified in Microsoft's security updates over the past 12 years [12][16]. - Rust's ownership model and compile-time checks are expected to systematically reduce risks associated with memory errors and data races, providing quantifiable security benefits for operating systems, cloud infrastructure, and virtualization platforms [16][17]. Group 3: Implementation Strategy - Microsoft has already begun rewriting parts of the Windows kernel in Rust, with 36,000 lines of code converted, and has plans for further integration [10][11]. - The project is part of a broader initiative within Microsoft's CoreAI Engineering Horizons department, aimed at building scalable software engineering capabilities that can be applied across the company and its clients [7][8]. Group 4: Industry Reactions - The announcement has sparked significant discussion within the tech community, with some defending C++ as a viable language for robust programming, while others support the shift to Rust as a necessary evolution in software engineering practices [21][22][26]. - Critics argue that the focus should be on improving engineering practices rather than solely on the programming language used, highlighting the complexity of software development and the need for skilled developers [22][25].