A high-performance, asynchronous USB Host driver implementation written in Rust for embedded systems and operating system kernels.
#![no_std] environments with minimal memory footprintCrabUSB uses an innovative lock-free design based on TRB rings where each TRB represents an async task. The future queries the ring to obtain async results without requiring a specific executor, making it highly flexible and performant.
The driver supports multiple backends:
libusb feature)┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Application │◄──►│ USB Interface │◄──►│ Backend │
│ │ │ (usb-if) │ │ Selection │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│ │
▼ ▼
┌──────────────┐ ┌──────────────┐
│ Descriptors │ │ xHCI / libusb│
│ & Transfers │ │ Drivers │
└──────────────┘ └──────────────┘