Core Viewpoint - Microsoft is adopting Rust programming language to enhance the security of its Windows operating system, addressing vulnerabilities that arise from using C and C++ [4][6][26]. Group 1: Security Enhancements - Microsoft has been continuously improving the security of the Windows system for decades and is now rewriting parts of the code in Rust to mitigate security issues [4][6]. - The introduction of Rust aims to prevent vulnerabilities from being exploited; when a bug is found in Rust code, the system crashes predictably rather than allowing an attacker to take control [6][10]. - The DirectWrite component has been rewritten in Rust, resulting in faster performance and elimination of previous vulnerabilities [6]. Group 2: Azure and Rust Implementation - Azure has mandated the use of Rust for new projects, particularly those involving untrusted data processing, due to the high risks associated with C++ [8][9]. - The Caliptra hardware root of trust was entirely developed in Rust, showcasing the language's application in critical infrastructure [8]. - Azure Boost requires that any module handling untrusted data must be written in Rust, further solidifying the language's role in Microsoft's cloud services [9][10]. Group 3: Office Team's Transition - The Office team faced challenges with their DiskANN semantic search system, which could not handle the scale required for millions of documents, leading to a decision to rewrite it in Rust [15][16]. - The transition to Rust resulted in significant performance improvements while maintaining accuracy, prompting the Office team to fully adopt Rust [16][17]. Group 4: Developer Adoption and Feedback - Internal surveys indicate that developers generally have a positive view of Rust after overcoming initial adaptation challenges, particularly those transitioning from C++ [21][22]. - Developers appreciate the performance gains from migrating C++ code to Rust and the reduction in debugging time, despite some complaints about the complexity of integrating Rust with existing C++ and C code [23]. Group 5: Future Prospects and Industry Impact - Microsoft is developing an AI tool to automate the migration of codebases from C++ to Rust, which could significantly reduce the labor costs associated with such transitions [24]. - The push for Rust is seen as a critical move for future software engineering, with support from entities like the NSA and the Linux community, indicating a broader industry shift towards memory-safe languages [26][27]. - The introduction of a driver framework for Rust aims to enhance the security of the Windows ecosystem by encouraging hardware manufacturers to adopt Rust for driver development [18][19].
告别漏洞百出的 C++!微软用 Rust 赌上未来,内核和 Office 都在“锈”化