5

2022年Rust将成为Linux内核第二语言

 2 years ago
source link: https://www.jdon.com/57917
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

2022年Rust将成为Linux内核第二语言

几个月以来,在为 Linux 内核启用 Rust 方面取得了更多进展:

Miguel Ojeda 刚刚几分钟前已经发送了“v2”补丁以在内核中支持 Rust。补丁系列将 Rust 作为第二语言添加到 Linux 内核中。

通过这些更新的包,Rust 代码现在依赖于稳定的 Rust 1.57.0版本而不是之前的 beta 编译器,添加了新的模块化选项,更严格的代码执行,启用了额外的 Rust 编译器诊断,内核中使用的新抽象,以及其他低级别代码改进。红帽现在也加入了 Arm、谷歌和微软,表达他们对 Linux 内核中的 Rust 代码的支持。

Linus Torvalds 认为:Linux 最终不会用 Rust 编写,没有人会用 Rust 重写内核的 2500 万行 C。

在 Rust 语言负责人 Josh Triplett 和 Google 工程师 Nick Desaulniers 的带领下,他们提议在内核中使用系统级 Rust 语言。为什么?因为它比 C 安全得多,尤其是在处理内存错误方面。

Torvalds 看到了优势。虽然他鼓励采用缓慢但稳定的方法将 Rust 引入 Linux,但他也表示将 Rust 接口用于驱动程序和其他非核心内核程序是有道理的。

现在工作进展顺利,希望在 2022 年的某个时候看到 Linux 内核中的第一个 Rust 代码。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK