usb-gadget 1.0: Implement USB peripherals in Rust on Linux

53 points surban 7 comments

Hey Rustaceans!

About two years ago I shared usb-gadget here, a library for implementing USB gadgets (peripherals) on Linux. Today it hits 1.0! ๐ŸŽ‰

usb-gadget lets you:

  • ๐ŸŽ›๏ธ Configure standard USB functions: serial ports, network interfaces, HID, mass storage, printers, audio, MIDI, video, and more
  • ๐Ÿ”จ Implement fully custom USB functions in user-mode Rust via FunctionFS
  • ๐Ÿง‘โ€๐Ÿ”ง Set up WebUSB, Microsoft OS descriptors (WinUSB), and DFU

What's new since the original announcement:

  • USB gadget CLI tool: configure gadgets from TOML files without writing code
  • DMAbuf support for zero-copy I/O in custom functions
  • DFU descriptor support for firmware upgrade interfaces
  • UAC1, loopback, and sourcesink gadget support
  • More UVC video formats
  • various bug fixes and improved error handling

The API has been stable for a while now and is used in production, so it felt like the right time to commit to semver stability.

Thank you to everyone who contributed along the way, through PRs, issues, bug reports, and patches from forks. This release wouldn't have been possible without the community!

๐Ÿ“ฆ crates.io ยท ๐Ÿ“ Docs ยท ๐Ÿ’ป GitHub