New Linux Kernel Patches Begin Plumbing Rust Support Into Bcachefs Driver

Written by Michael Larabel in Linux Storage on 7 February 2024 at 06:45 AM EST. 91 Comments
LINUX STORAGE
There's been much excitement around the Bcachefs file-system since it was mainlined in the Linux kernel at the end of last year. Looking ahead to Linux 6.9 it's looking like it may be one of the first file-system drivers to begin making use of the Rust programming language.

A request for comments (RFC) patch series was sent out that allows for making use of Rust code within the Bcachefs kernel driver. The user-space utilities in bcachefs-tools already have been making use of the Rust programming language while this new patch series is about the Bcachefs kernel code.

For now at least the Rust code within the Bcachefs driver would be hidden behind a "CONFIG_BCACHEFS_RUST" Kconfig switch and be considered optional. The patch series by Thomas Bertschinger notes that Bcachefs lead developer Kent Overstreet is hoping to merge the Rust+Bcachefs code for the upcoming Linux 6.9 merge window.

This patch series is just about making use of Rust code internally within the Bcachefs driver and doesn't expose any new public Rust APIs or the like. More details on this patch series for introducing Rust support for Bcachefs can be found on the Rust-for-Linux mailing list.

In response to the posting, Rust for Linux developer Miguel Ojeda has questioned the overall plans for Bcachefs. In particular, if the file-system intends to implement all functionality in both C and Rust versions or how the use of Rust will be handled if it's to remain optional for the file-system driver. If Bcachefs decides to make Rust mandatory in the future, it will then limit the supported architectures and platforms where Rust is supported. Miguel also says it's "worrying" around their mixing of C and Rust as well as the tight timeline for Linux 6.9, so we'll see how quickly this moves ahead...
Related News
About The Author
Michael Larabel

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, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week