Rust usbip protocol library and tooling
Find a file
Jiajie Chen a19bfe8301 Simplify documentation (fixes #59)
Remove redundant sections from README and update LICENSE copyright year.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-12-25 20:58:48 +08:00
.github/workflows Add stale bot 2025-06-13 17:17:59 +08:00
examples Add unset string fuctions 2024-10-26 09:35:32 +08:00
src Fix clippy warning: cloned_ref_to_slice_refs 2025-12-25 20:52:45 +08:00
.gitignore Initial usbip server based on tokio 2020-05-15 21:18:28 +08:00
Cargo.toml Migrate to nusb 0.2.1 2025-12-24 23:17:02 +08:00
LICENSE Simplify documentation (fixes #59) 2025-12-25 20:58:48 +08:00
NOTES.md Add notes 2022-12-05 17:39:37 +08:00
README.md Simplify documentation (fixes #59) 2025-12-25 20:58:48 +08:00

usbip

Coverage Status crates.io

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:

  1. hid_keyboard: Simulate a HID keyboard that types something every second
  2. cdc_acm_serial: Simulate a CDC ACM serial device that receives a character every second
  3. 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.