Linux内核更新加入Rust语言支持 并开始提供网络和异步功能

科技 7个月前 cnBeta
125 0 0

在一个激动人心的周六早晨,Miguel Ojeda发布了最新的补丁系列,历史性地将Rust语言支持纳入Linux内核。"Rust for the

与此同时,Rust for Linux的努力仍在继续,许多开发者和组织有兴趣看到在内核中开始使用Rust代码的能力,特别是在容易出现内存安全问题的领域。在今天发布的v6补丁中,工具链支持已经针对Rust 1.60进行了更新,支持在内核中运行文档测试,以及其他Rust基础设施的改进。


从这个Rust for Linux v6系列来看,Rust支持仍然被认为是"实验性的",但表现已经足够好,如果需要的话,内核开发者可以开始为其他内核子系统开发Rust抽象,并将更多的驱动移植到Rust上。



At the same time, Rust for Linux's efforts continue, and many developers and organizations are interested in seeing the ability to start using Rust code in the kernel, especially in areas prone to memory security problems. In today's V6 patch, toolchain support has been updated for Rust 1.60 to run documentation tests in the kernel, as well as other Rust infrastructure improvements.

When it comes to the use of Rust code in the kernel, you can see the beginning of network support in this patch series. The net" module supports Namespace, SkBuff, Ipv4Addr, SocketAddrV4, TcpListener and other types. And & quot;async" began to support asynchronous kernel programming. The current state is already working to allow asynchronous TCP socket code. The new Rust code also adds support for network packet filters and other new features.

From the perspective of this Rust for Linux V6 series, Rust support is still considered quot; experimental & quot;, is good enough that kernel developers can start developing Rust abstractions for other kernel subsystems and porting more drivers to Rust if necessary.

For more details on the updated Rust code for the Linux kernel, take a look at this patch series:[email protected]/

The current Rust kernel effort has reached 379000 lines of code, including the underlying, subsystem abstractions that have started so far, sample code, and the conversion of some Android and GPIO driver code to Rust as additional examples.

版权声明:cnBeta 发表于 2022-05-08 10:46。
转载请注明:Linux内核更新加入Rust语言支持 并开始提供网络和异步功能 | ColaBug