News: 0001451825

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Rust Bindings Posted For KMS Drivers, VKMS Ported To Rust

([Linux Kernel] 3 Minutes Ago RVKMS)


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 [1]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.

[2]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.

Those interested can see [3]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.



[1] https://www.phoronix.com/news/Red-Hat-Nova-Rust-Abstractions

[2] https://www.phoronix.com/search/VKMS

[3] https://lore.kernel.org/dri-devel/20240322221305.1403600-1-lyude@redhat.com/



phoronix

A well-used door needs no oil on its hinges.
A swift-flowing steam does not grow stagnant.
Neither sound nor thoughts can travel through a vacuum.
Software rots if not used.

These are great mysteries.
-- Geoffrey James, "The Tao of Programming"