v0.1.0
π¦ Deno FFI bindings for the HIDAPI library to access USB devices.
Repository
Current version released
2 years ago
π¦ Deno USB HID API
Deno FFI bindings for the HIDAPI library to access USB devices.
This work in progress uses unstable Deno APIs and requries the --unstable
, --allow-ffi
, and --allow-env
flags.
The module exports hidapi
library symbols and HID
wrapper class.
Usage
Install or build the HIDAPI library (e.g. brew install hidapi
).
Set the DENO_USBHIDAPI
environment variable to the dynamic library path.
Homebrew on MacOS installs at:
/opt/homebrew/opt/hidapi/lib/libhidapi.dylib
Building from source on a Raspberry Pi installs at:
/usr/local/lib/libhidapi-hidraw.so
On Windows see HIDAPI Releases (Iβve not tested Windows).
Resources
- libusb/hidapi β HIDAPI library for Windows, Linux, FreeBSD and macOS.
- Foreign Function Interface API β Deno documentation (unstable).
- WebHID API β MDN documentation for the native browser spec.
- βAdd support for HID APIβ β Deno issue discussion.
- littledivy/webusb β WebUSB API implementation in Rust (and Deno).
- node-hid β Node.js bindings.
- Python Elgato Stream Deck Library β original inspiration leading to this project.
- deno_python β Python interpreter bindings for Deno.
License
MIT License
MIT License | Copyright Β© 2022 David Bushell | @dbushell