usbip icon indicating copy to clipboard operation
usbip copied to clipboard

WebAssembly + WebUSB support

Open beriberikix opened this issue 1 year ago • 3 comments

Hello! I'm curious if you or anyone is considering porting this to WebAssembly so that it can be combined with WebUSB. I have a project idea where I transport USB/IP over WebSockets to share device from the browser to a web server.

beriberikix avatar Aug 14 '23 01:08 beriberikix

I believe the core protocol part can be built to WebAssembly, but the rusb/tokio parts may need some porting to allow custom transport.

jiegec avatar Aug 14 '23 03:08 jiegec

Ah, makes sense. There is a crate for webusb that uses rusb as a backend, but that probably doesn't help here much. https://docs.rs/webusb/latest/webusb/

beriberikix avatar Aug 15 '23 16:08 beriberikix

It's also worth noting that libusb, which is what rusb is based on, has an emscripten-based backend that might be useful for anyone else interested in this :)

beriberikix avatar Aug 25 '23 23:08 beriberikix