Workflow
内存安全
icon
Search documents
“AI 写的 C++ 代码,客观上比人类更烂”,吴咏炜对话 Adobe 首席科学家 David Sankel|近匠
AI科技大本营· 2026-02-16 07:43
Core Viewpoint - C++ remains an irreplaceable language for achieving extreme performance through absolute control over low-level operations, despite facing challenges from emerging languages like Rust and the impact of AI programming paradigms [1]. Group 1: Memory Safety and Code Vulnerabilities - Most memory safety vulnerabilities originate from newly written code rather than legacy systems, primarily due to the "code hardening" process that occurs over time in older codebases [10][11]. - C++ has not fundamentally eliminated memory-related vulnerabilities, as developers can still easily write code that leads to out-of-bounds access, similar to issues seen in C [12][13]. - The adoption of advanced dynamic analysis tools in C++ is limited due to high configuration costs and a lack of awareness among developers [13][14]. - Even with the use of sanitizers, C++ code continues to exhibit a significantly higher number of memory safety vulnerabilities compared to Rust, with Google reporting C++ vulnerabilities being nearly 1000 times more frequent than those in Rust [15][16]. Group 2: C++'s Unique Value Proposition - C++ offers a unique niche by allowing developers to trade off the risks of "undefined behavior" for maximum performance, which is difficult to replicate in languages like Rust [17][18]. - The historical inertia of C++ is significant, as many established libraries and codebases have been optimized over decades, making it impractical to rewrite them in newer languages [20]. - The productivity paradox arises where Rust's safety features may lead to increased code complexity and reduced productivity compared to C++, despite reports of higher productivity for Rust developers in certain domains [21][22]. Group 3: Tooling and Ecosystem Challenges - C++ suffers from a fragmented compiler ecosystem, making it challenging to distribute precompiled libraries and manage dependencies effectively [27][28]. - The lack of a unified package management system in C++ contrasts sharply with Rust's modern package management ecosystem, which significantly enhances developer productivity [27][29]. - The C++ standardization process has focused primarily on language specifications, neglecting the development of a cohesive tooling ecosystem, which has hindered its evolution [29][32]. Group 4: AI in Programming - AI-generated code has been found to be less secure in C++, with developers often overestimating its reliability compared to their own code [39][40]. - In contrast, Rust's strict syntax and features make it more challenging for AI to generate unsafe code, as incorrect code will not compile [41][42]. - The integration of AI tools in programming workflows has shifted the focus from writing code to reviewing AI-generated code, which can be frustrating for developers [38][39]. Group 5: Undefined Behavior and Future Proposals - Ongoing proposals aim to address undefined behavior in C++, with the introduction of the concept of "erroneous behavior" in C++26 being a notable development [44][45]. - There is a concern that some proposals related to undefined behavior may lack practical implementation strategies, potentially diverting attention from more effective solutions [45][46].
11天狂写10万行代码,13年Rust老兵,与Claude联手从零造了一门新语言
3 6 Ke· 2026-01-07 12:49
Core Insights - Steve Klabnik, a senior technical expert in the Rust community, has developed a new experimental systems programming language called Rue in just 11 days with the help of AI tool Claude, writing approximately 100,000 lines of Rust code [1][11] - Klabnik's motivation to create a programming language stems from his long-standing interest in language design and compiler development, which he has pursued for over a decade [3][4] - The name "Rue" was chosen for its connection to Klabnik's admiration for Ruby and Rust, as well as its connotations and brevity [8] Development Process - Klabnik initially hesitated to develop a programming language due to the high expectations and complexities involved, which have increased over the years [4][10] - His perspective shifted with the advancement of AI tools, leading him to explore the feasibility of using AI to assist in compiler development [4][12] - The project faced a temporary halt due to work commitments but resumed in late 2025, with Klabnik feeling more adept at utilizing AI for software development tasks [5][6] Project Features and Goals - Rue aims to provide memory safety without relying on garbage collection, positioning itself as a higher-level language than Rust but lower than Go, focusing on usability [8][10] - The development of Rue has already attracted attention from other developers, evolving from a personal experiment into a collaborative effort [6][15] - The project is still in its early stages, with Klabnik emphasizing that it is primarily for fun and exploration rather than a serious push for adoption [15] Community Reactions - The announcement of Rue has sparked discussions in the programming community, with opinions divided on the necessity of new languages in the age of AI [15][16] - Some argue that the emergence of AI reduces the need for learning new languages, while others believe it enhances the value of language experimentation [16]
从安全内核到可用系统:星绽NixOS发行版发布,加速OS行业向Rust迁移
Huan Qiu Wang· 2025-12-26 09:01
Core Viewpoint - Asterinas has launched Asterinas NixOS, the first distribution featuring a pure Rust operating system kernel, marking a significant step towards native memory safety in the OS industry [1][2]. Group 1: Asterinas NixOS Overview - Asterinas NixOS integrates a pure Rust kernel with the mature software ecosystem of NixOS, transitioning from a kernel project to a usable system [1]. - The project has been developed over three years, contributing 130,000 lines of Rust code and supporting over 230 Linux system calls [2]. - The release signifies a milestone, enabling Asterinas to support a user space for installation and experience [2]. Group 2: Technical Advantages - Asterinas NixOS is built on the innovative "framekernel" architecture, providing high performance and security compared to traditional OS kernels [2]. - It inherits the "system state stability reproduction" feature from NixOS, allowing developers to automatically construct systems based on specified software and configuration needs, ensuring consistent results across different machines and times [3]. - The integration with NixOS's extensive software ecosystem, which includes over 120,000 packages, allows Asterinas NixOS to avoid starting from scratch, facilitating a quicker transition to a mature system [3]. Group 3: Industry Trends and Future Plans - The trend in the industry is shifting towards native memory safety, with major players like Microsoft planning to migrate core codebases to Rust by 2030 [1][4]. - Asterinas NixOS aims to establish a reproducible and comparable baseline in real application loads, positioning itself at the forefront of memory-safe kernel engineering [4]. - The latest version, Asterinas 0.17.0, meets core user needs for desktop and server environments, with plans for deployment in secure computing and trusted data spaces by 2026 [4].
“我们要彻底告别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].
用了 Rust,谷歌实测安卓内存漏洞率比 C/C++ 低 1000 倍!
程序员的那些事· 2025-11-16 10:14
Core Insights - Rust has become a controversial programming language, with government agencies in the U.S. advocating for its adoption over C/C++ due to its memory safety features, while some developers express skepticism about its complexity and perceived overhype [1][2]. Group 1: Rust's Impact on Android Security - Memory safety vulnerabilities in Android have dropped below 20% for the first time, according to Google's 2025 data [2]. - Rust has reduced the density of memory safety vulnerabilities by 1000 times compared to existing C/C++ code in Android [4]. - The introduction of Rust has not only improved security but also enhanced software delivery efficiency, with rollback rates decreasing by 4 times and code review times reduced by 25% [4][15]. Group 2: Adoption and Trends - Since 2021, Google has been integrating Rust into the Android system as a safer alternative to C/C++ [5]. - The usage of Rust is rapidly increasing, while new C++ code is declining [6]. - Rust's new code volume is now comparable to that of C++, indicating similar development efficiency [9]. Group 3: Performance Metrics - Google utilized the DORA framework to assess performance, focusing on throughput and stability [10]. - Rust code requires approximately 20% fewer modifications than C++ code of similar scale [11]. - Rust's rollback rate is about one-fourth that of C++ in medium to large changes, indicating higher stability [18]. Group 4: Broader Applications of Rust - Google is expanding Rust's use in various areas, including system services, libraries, and applications, due to its safety and productivity advantages [22]. - Specific implementations include Nearby Presence for Bluetooth device discovery, RCS security messaging, and various parsers in Chromium [23]. Group 5: Addressing Concerns and Future Outlook - Google acknowledges that while Rust does not guarantee zero vulnerabilities, it significantly reduces vulnerability density, estimating 0.2 vulnerabilities per million lines of Rust code compared to 1000 per million lines of C/C++ [32][33]. - The company believes that Rust allows for a balance between speed and safety, potentially restoring performance and productivity previously sacrificed for security [37][38].
吴说每日精选加密新闻 - 美国 2025 年非农就业基准变动初值 -91.1 万人,预期 -70 万人
Xin Lang Cai Jing· 2025-09-10 14:24
Group 1 - The initial value of the U.S. non-farm employment benchmark change for 2025 is -911,000, which is worse than the expected -700,000 and the previous value of -598,000, leading traders to anticipate a rate cut by the Federal Reserve [1] - The U.S. Producer Price Index (PPI) for August shows a year-on-year rate of 2.6%, the lowest since June, compared to an expected 3.3% and a previous value of 3.3%, with a month-on-month rate of -0.1% against an expectation of 0.3% [2] - The SEC has postponed the decision on Bitwise Dogecoin ETF and Grayscale Hedera ETF until November 12, with a total of 31 altcoin spot ETF applications and 92 crypto ETF products pending as of 2025 [3] Group 2 - SOL Strategies has officially listed on NASDAQ under the ticker STKE, holding 435,064 SOL valued at approximately $94.25 million [4] - The co-founder of Cobo, Shen Yu, stated that the iPhone 17's upgrade enhances the security of wallet signatures and Passkeys through hardware-level memory safety technology [5] - Vietnam has launched a five-year pilot program for cryptocurrency trading, allowing only local platforms and mandating transactions in Vietnamese Dong, with foreign investors allowed but limited to 49% ownership [6]
Rust 天花板级大神公开发帖找工作:3000 次核心提交,不敌 “会调 OpenAI API、用 Cursor”?
AI前线· 2025-09-06 05:33
Core Viewpoint - The Rust community is facing challenges as two prominent contributors, Nicholas Nethercote and Michael Goulet, publicly seek new job opportunities due to budget cuts at their current organization, Futurewei, which reflects a broader trend of resources being diverted towards AI projects, leaving foundational projects like Rust underfunded [2][9][11]. Group 1: Contributors' Background - Nicholas Nethercote is a key contributor to the Rust project and has a notable background, including a PhD from Cambridge and co-authorship of the Valgrind tool, which is essential for memory debugging and performance analysis [4][5]. - He has made significant contributions to the Rust compiler, with over 3,375 commits, and has been instrumental in improving the compiler's performance and maintainability through various technical debt cleanup efforts [5][6]. Group 2: Current Job Search Context - Nethercote's job search is attributed to budget cuts in his team, which has led to a reduction in positions, highlighting the impact of international factors and the shift of attention and funding towards AI [9][11]. - Both Nethercote and Goulet express a desire to continue working within the Rust ecosystem, explicitly avoiding sectors like blockchain and generative AI [13]. Group 3: Industry Implications - The situation underscores a paradox in the tech industry where highly skilled engineers in foundational technologies like Rust are struggling to find opportunities, while demand for AI-related skills surges [15][19]. - The recruitment landscape has shifted, with a focus on AI capabilities overshadowing traditional programming skills, leading to a disconnect between the needs of foundational projects and the current job market [19]. Group 4: Rust's Future and Challenges - The ongoing debate about Rust's potential to replace C continues, with notable figures like Brian Kernighan expressing skepticism about Rust's performance and usability compared to C [21][23]. - The retention of top talent in the Rust community is critical for its future, especially in light of the increasing competition for resources and attention from AI projects [23].