内存安全语言
Search documents
Debian APT宣布“Rust令”:六个月内不支持的架构将被淘汰
3 6 Ke· 2025-11-03 11:54
Core Points - The Debian community has announced that starting from May 2026, the APT package management tool will require the use of the Rust toolchain for all architectures, raising concerns among users and developers about the implications for unsupported ports [1][2][4] Group 1: Reasons for the Change - The introduction of Rust as a hard dependency in APT is aimed at enhancing memory safety and improving unit testing methods, particularly for code related to parsing .deb, .ar, and .tar files, as well as HTTP signature verification [2] - The move is seen as essential for the project's progress, emphasizing the need to rely on modern tools and technologies rather than struggling with outdated systems [2] Group 2: Challenges for Unsupported Ports - Some lesser-known Debian ports, such as m68k, HPPA, SuperH/SH4, and Alpha, face challenges due to the lack of adequate Rust support, which could lead to their potential elimination if they cannot compile and run Rust code [4][5] - Currently, only DEC Alpha, HP PA-RISC, and Hitachi SH-4 lack any Rust compiler, while Motorola 68000 has partial support that is insufficient for Debian [4] Group 3: Community Reactions - Reactions within the Debian community are mixed, with some expressing discomfort over the perceived dismissal of non-Rust supporting ports as "retro computing," while others argue that Rust's safety benefits are valid [5][6] - Concerns have been raised about the short six-month deadline for migration, with suggestions that such transitions typically require more time for proper implementation and testing [5][6] Group 4: Developer Support and Community Size - The success of this transition hinges on whether there are enough developers within the community to support the necessary compiler expansions and fixes for the affected ports [6] - The burden of ensuring software compatibility on platforms with minimal installation percentages is highlighted as a significant challenge for maintainers [6]
告别漏洞百出的 C++!微软用 Rust 赌上未来,内核和 Office 都在“锈”化
程序员的那些事· 2025-10-05 12:56
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].