Skip to content

NessajCN/nusbip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

166 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nusbip

Coverage Status crates.io

A Rust library to run a USB/IP server to simulate USB devices.

It also enables sharing devices from an OS supporting libusb(libusb claims that it supports Linux, macOS, Windows, OpenBSD/NetBSD, Haiku and Solaris) to another OS supporting USB/IP(Linux, Windows). Sharing an CCID SmartCard from macOS to Linux is tested by running gpg --card-status.

How to use

See examples directory.

  • host: Act like original usb/ip sharing server, sharing one device from one machine to another. Also supports sharing from macOS to Linux!

To run example, run:

$ env RUST_LOG=info cargo run --example host

You need to be the root user to run the example. Or you could

$ cd nusbip/
$ cargo b
$ sudo RUST_LOG=info target/debug/nusbip

Then, in a USB/IP client environment:

$ usbip list -r $remote_ip
$ usbip attach -r $remote_ip -b $bus_id

Then, you can inspect the simulated USB device behavior in both sides.

Difference from usbip

Based on nusb (pure Rust library) instead of rusb(libusb wrapper).

API

See code comments. Not finalized yet, so get prepared for api breaking changes.

About

A Rust library to run a USB/IP server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 100.0%