11 releases (7 breaking)
Uses new Rust 2024
| new 0.8.0 | Jan 27, 2026 |
|---|---|
| 0.7.1 | Jan 14, 2024 |
| 0.7.0 | Dec 30, 2023 |
| 0.6.0 | Feb 22, 2023 |
| 0.2.1 | Jun 15, 2020 |
#143 in Hardware support
125KB
3K
SLoC
usbip
A Rust library to run a USB/IP server to simulate USB devices and share real USB devices over a network.
What is USB/IP?
USB/IP is a network protocol that allows USB devices to be shared between computers over a network. It enables:
- Device simulation: Create virtual USB devices that can be accessed remotely
- Device sharing: Share physical USB devices from one machine to another
- Cross-platform: Works across different operating systems (Linux, etc.)
Installation
Prerequisites
Install Rust from the official documentation.
Building from source
git clone https://github.com/jiegec/usbip.git
cd usbip
cargo build --release
How to use
Examples
The examples/ directory contains three example programs:
- hid_keyboard: Simulate a HID keyboard that types something every second
- cdc_acm_serial: Simulate a CDC ACM serial device that receives a character every second
- host: Act as a USB/IP server, sharing physical devices from the host machine to remote clients
Running an example
cargo run --example hid_keyboard
Connecting from a USB/IP client
On the client machine (e.g. Linux with USB/IP support):
# List available devices
usbip list -r $remote_ip
# Attach to a device
usbip attach -r $remote_ip -b $bus_id
License
MIT License - see LICENSE file for details.
Dependencies
~4–18MB
~205K SLoC