Thursday, April 15, 2021

Rust Support in the Linux Kernel

Miguel Ojeda:

Please note that the Rust support is intended to enable writing drivers and similar “leaf” modules in Rust, at least for the foreseeable future. In particular, we do not intend to rewrite the kernel core nor the major kernel subsystems (e.g. kernel/, mm/, sched/...). Instead, the Rust support is built on top of those.

[…]

By using Rust in the Linux kernel, our hope is that:

  • New code written in Rust has a reduced risk of memory safety bugs, data races and logic bugs overall, thanks to the language properties mentioned below.
  • Maintainers are more confident in refactoring and accepting patches for modules thanks to the safe subset of Rust.
  • New drivers and modules become easier to write, thanks to abstractions that are easier to reason about, based on modern language features, as well as backed by detailed documentation.

Wedson Almeida Filho:

In our previous post, we announced that Android now supports the Rust programming language for developing the OS itself. Related to this, we are also participating in the effort to evaluate the use of Rust as a supported language for developing the Linux kernel. In this post, we discuss some technical aspects of this work using a few simple examples.

Comments RSS · Twitter

Leave a Comment