VOOZH about

URL: https://www.phoronix.com/news/Linux-USB-Rust-Drivers

⇱ Patches Posted To Allow Writing USB Rust Drivers For Linux - Phoronix


👁 Phoronix

Patches Posted To Allow Writing USB Rust Drivers For Linux

Written by Michael Larabel in Hardware on 27 August 2025 at 09:44 AM EDT. 26 Comments
An initial set of Linux kernel patches were posted this week for allowing USB Rust kernel drivers to be developed for Linux.

Daniel Almeida of Collabora posted the initial set of patches to begin hashing out the Rust USB abstractions for the Linux kernel.

Almedia explained on the patch series:
"This adds initial support for USB Rust drivers, not only because I see a widespread use of module_usb_driver() in media (which is a subsystem I aim to support) but also because I want to learn about USB in general and this is a nice opportunity to start doing so.

I tried to keep things as consistent with pci.rs and platform.rs as possible and tested it by manually binding a device (i.e.: my Logitech mouse) to the sample driver via:

/sys/bus/usb/drivers/rust_driver_usb/new_id

This initial patch is therefore comprised of the same patterns that are known to work for pci and platform already.

Physically disconnecting the device also worked, i.e.: nothing bad showed up in dmesg."

This is just the very initial patches with further revisions expected before the Rust USB abstractions would be upstreamed into the Linux kernel. In current form usb.rs is less than five hundred lines of new code.

👁 Rusty USB connectors


These patches are also just the very initial USB device driver abstractions with further work then needed for extending it out to cover USB media drivers and other possible USB driver scenarios within the Rust programming language. In addition to the abstractions is also a sample Rust USB driver in less than 50 lines of Rust code.

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.