WICG / webusb

Connecting hardware to the web.
https://wicg.github.io/webusb/
Other
1.31k stars 131 forks source link

Usable from node.js? #54

Closed fjanon closed 8 years ago

fjanon commented 8 years ago

Will it be possible to use the driver from node.js?

Bioblaze commented 8 years ago

Well, It looks like you'll be able to interface with it in some-aspects. I'm sure, that jQuery and other Javascript API calls will be available once they make it public and, Since it will possibly be on ems, we should look forward too a node.js cli most likely

reillyeon commented 8 years ago

Node.js and the Web Platform don't generally share APIs beyond what is defined ECMAScript (i.e. implemented by V8). The implementation of WebUSB in Chromium is part of Blink, not V8.

That said, Node.js could implement the same (or at least a similar enough) API so that code used to drive devices on the web could also be used in a Node.js-based application. In fact, it looks like there are a couple of Node.js libraries that wrap the native libusb library. One could write a wrapper around these APIs that exposes the API defined by this specification. That is essentially what is done by Chromium anyways.

Closing this issue as the question has been answered.