Rust Bindings Posted For KMS Drivers, VKMS Ported To Rust

Written by Michael Larabel in Linux Kernel on 23 March 2024 at 06:57 AM EDT. 29 Comments
LINUX KERNEL
So far when it comes to Direct Rendering Manager (DRM) / Kernel Mode-Setting (KMS) display drivers for Linux, there are Rust efforts underway for the Apple Silicon kernel graphics driver with the Asahi Linux project as well as the new Nova effort for a modern open-source NVIDIA kernel driver from Red Hat. Also now out from Red Hat is posting the Rust bindings for KMS to review plus porting the existing Virtual KMS driver over to Rust as the "RVKMS" driver.

Lyude Paul posted the patches for review on Friday that port the VKMS driver over to Rust and also the necessary Rust bindings for KMS in general. These Rust bindings will be important for Nova and other DRM/KMS drivers to come moving forward into the future.

VKMS as a reminder is a simple virtual KMS driver often used for testing purposes and other basic usage. VKMS provides a virtual display for headless systems or other testing. With it being quite a simple driver, it makes for an easy candidate for porting and testing of kernel interfaces.

Rust + Linux


Those interested can see this patch series laying out the proposed Rust bindings and the initial RVKMS driver code. It's important to note though that the RVKMS driver is considered a work-in-progress and the driver patch currently carries this notice:
"This introduces a work in progress port of the VKMS driver to rust to provide a user of the kernel's new rust bindings for KMS drivers! This driver is very incomplete, I'm not even sure if it loads right now without crashing (but it did at one point, and I'll be checking very soon!)."

In any event a growing number of open-source Linux driver developers are interested in transitioning code over to Rust where appropriate for better memory safety and security, a lower barrier to entry for new developers, and other benefits.
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