Linus Torvalds' Initial Comment On Rust Code Prospects Within The Linux Kernel
Written by Michael Larabel in Linux Kernel on 11 July 2020 at 09:46 AM EDT. 77 Comments
LINUX KERNEL --
Kernel developers appear to be eager to debate the merits of potentially allowing Rust code within the Linux kernel. Linus Torvalds himself has made some initial remarks on the topic ahead of the Linux Plumbers 2020 conference where the matter will be discussed at length.

In the mailing list thread when discussing Greg Kroah-Hartman's past comments on the Rust prospects for the kernel, it was mentioned that one of the conditions being sought is that it would effectively be disabled by default until there has been sufficient testing.

Linus Torvalds chimed in though with his own opinion on the matter. Linus commented that he would like it to be effectively enabled by default to ensure there is widespread testing and not any isolated usage where developers then may do "crazy" things. He isn't calling for Rust to be a requirement for the kernel but rather if the Rust compiler is detected on the system, Kconfig would enable the Rust support and go ahead in building any hypothetical Rust kernel code in order to see it's properly built at least.
No, please make it a "is rust available" automatic config option. The exact same way we already do the compiler versions and check for various availability of compiler flags at config time.

See init/Kconfig for things like

config LD_IS_LLD
def_bool $(success,$(LD) -v | head -n 1 | grep -q LLD)

and the rust support should be similar. Something like

config RUST_IS_AVAILABLE
def_bool $(success,$(RUST) ..sometest..)

because I _don't_ want us to be in the situation where any new rust support isn't even build-tested by default.

Quite the reverse. I'd want the first rust driver (or whatever) to be introduced in such a simple format that failures will be obvious and simple.

The _worst_ situation to be in is that s (small) group of people start testing their very special situation, and do bad and crazy things because "nobody else cares, it's hidden".

No, thank you.

Linus

At least he didn't shoot down the idea of Rust support within the kernel. We'll see where the direction of Rust language support within the Linux kernel leads after LPC2020.

The virtual Linux Plumbers Conference runs from 24 to 28 August. The annual gathering of key Linux kernel developers was going to take place in Halifax, Canada until they had to scuttle those plans as a result of the coronavirus in now making their first online LPC event.
Related News
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Popular News This Week