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

feat(extensions): Implement WebUSB API #10912

Closed
wants to merge 9 commits into from

Conversation

littledivy
Copy link
Member

Closes #9523

Implements the WebUSB API.

@littledivy
Copy link
Member Author

littledivy commented Jul 16, 2021

testing this on the CI is a PITA or maybe not even be possible without self hosted runners. The closest I've got to testing this without external hardware and tweaking the kernel is using raw_gadget on Linux for which I made a little test suite located here.

other alternative ways to test this:

  • Actual hardware
  • Linux functionfs/gadgetfs
    • Requires rebuilding kernel. Chrome uses gadgetfs. Not possible with current Github runners.
  • Linux raw_gadget
    • Perfectly fine for testing locally. Requires loading kernel modules and depends on udc_core (not available in Github runners).
  • umockdev
    • Didn't try because raw_gadget just worked. Assuming won't work in Github runners either?

overall the implementation is "battle-tested" on Linux and not tested on Mac or Windows at all.

@stale
Copy link

stale bot commented Sep 16, 2021

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 16, 2021
@stale stale bot closed this Sep 23, 2021
@kitsonk kitsonk reopened this Sep 23, 2021
@stale stale bot removed the stale label Sep 23, 2021
@kitsonk
Copy link
Contributor

kitsonk commented Sep 23, 2021

I re-opened this, just because stale bot closed it, but we discussed at the CLI design meeting. Without a clean way to test it as part of CI without self-hosted runners, we can't really add it, and it isn't enough of a priority for the core team try to find the way, so it would need to be up to the community.

@kitsonk kitsonk mentioned this pull request Sep 23, 2021
@littledivy
Copy link
Member Author

Without a clean way to test it as part of CI without self-hosted runners, we can't really add it

The current CI runners aren't capable of testing USB (no custom kernel no kernel modules nothing) and without the option of self hosted runners (which I am using without trouble in the webusb-rs repo) I really can't do much so I'm going to close the PR.

To interested readers, I plan to expose API bindings via FFI for the webusb crate in the near future.

@littledivy littledivy closed this Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support WebUSB
2 participants