Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: WASI USB API #570

Open
Wouter01 opened this issue Nov 29, 2023 · 2 comments
Open

Proposal: WASI USB API #570

Wouter01 opened this issue Nov 29, 2023 · 2 comments
Assignees
Labels
feature-request Requests for new WASI APIs

Comments

@Wouter01
Copy link
Contributor

Wouter01 commented Nov 29, 2023

This early proposal suggests the addition of USB support to WASI through an interface inspired by WebUSB (and the WebUSB equivalent in node.js).

The proposed USB interface for WASI should include methods for:

  • Device Enumeration (discovering connected USB devices + retrieving device information, such as the vendor ID)
  • Device Communication (connecting to an USB device, reading and writing data to devices)
  • Event Handlers (e.g. when a device is connected, disconnected)

Additionally, it's probably interesting to consider adding user permission for accessing USB devices.

I'm currently experimenting with WebUSB and WASI and I'm working on a proof of concept.
@Wadu436 is also looking into this.

If you have any feedback, let me know!

@merlijn-sebrechts
Copy link
Contributor

merlijn-sebrechts commented Dec 11, 2023

FYI: I would be co-champion of this proposal to ensure continuity. I'm a researcher at Ghent University in association with imec.

Given we mainly have a research background, it would be beneficial if an interested party from the industry could join us. We're happy to collaborate on this!

@RReverser
Copy link
Member

RReverser commented Dec 12, 2023

Hey, I'm an author of the Wasm+WebUSB backend in libusb and ported couple of projects using USB to the web (e.g. gphoto2 as an open-source example).

While I'm not strictly in hardware industry, I'd love to help with reviewing design if you need more eyes.

@sunfishcode sunfishcode added the feature-request Requests for new WASI APIs label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Requests for new WASI APIs
Projects
None yet
Development

No branches or pull requests

5 participants