Open idontusenumbers opened 3 years ago
I expect there will be a mix of device drivers published by the manufacturer, third-party drivers developed by the community, libraries that collect related device drivers, and generic drivers intended to support a class of devices. I don't have any opinions on how they should be packaged or distributed.
Certainly Chrome devs don't expect independent developers to build drivers themselves for countless, (as indicated) inconsistently built devices.
I think it's reasonable to push this work onto the community. Projects like the Linux kernel and SDL2 already support large numbers of HID devices as a community effort. Before WebHID, independent developers were already writing device drivers in javascript using node-hid.
Allowing the community to add support for the devices they use is better, in my opinion, than forcing them to wait until a browser developer gets around to adding explicit support in a high-level API (which might not happen at all).
The stated impetus for this API as documented on https://web.dev/hid/:
This will certainly improve the accessibility for writing code against HID devices, forgoing the need to learn, develop, build, and distribute native device drivers.
However, I suspect countless web developers implementing HID 'drivers' in javascript is just going to cause a new problem: inconsistent, buggy, and out-of-date behavior with very limited device support and sparse QA/Testing.
Is the expectation that individual devices drivers will be built and packaged as npm packages? Or driver libraries emerge with embedded collections of drivers that are community supported? Certainly Chrome devs don't expect independent developers to build drivers themselves for countless, (as indicated) inconsistently built devices.
I see a bleak future with a hodgepodge of inconsistently implemented and unpredictably supported hardware much worse than the stated problem. Am I missing something?