node-usb-detection
node-usb-detection copied to clipboard
Move prebuild system to `prebuildify` and `node-gyp-build`
The prebuild-install dependency now advocates against its own use:
Instead of
prebuild
paired withprebuild-install
, we recommendprebuildify
paired withnode-gyp-build
.
The benefits touted by prebuildify
and node-gyp-build
seem like useful upgrades to the build system that could meaningfully reduce the number of issues faced by Electron users of this library (e.g. #153). I'm not sure, but it looks like there's a chance it could also make it easier / possible to start shipping a universal macOS prebuilt binary to resolve #141.
With prebuildify, all prebuilt binaries are shipped inside the package that is published to npm, which means there's no need for a separate download step like you find in prebuild. The irony of this approach is that it is faster to download all prebuilt binaries for every platform when they are bundled than it is to download a single prebuilt binary as an install script.
(Aside: I'm about to go on several weeks of vacation, and I intend to look into this when I'm back. Until that time, though, if someone else picked this ticket up, I would not be disappointed!)
Thanks for the background and details here @mcous! The plan to migrate seems good to me 👍
Have a good vacation 🏖🏞
We recently ported node-usb to prebuildify
using prebuildify-cross
, it may serve as inspiration.
Coupled with a port to node-addon-api
it should fix most platform issues and future proof the library.
Shout if you want some help
I would be concerned about how big a nan based package would end up being. It produces a rather long list of targets, which will only get worse if adding prebuildify-cross to the mix
I really need to finish up that node-api rewrite I started...