mapbox / node-pre-gyp

Node.js tool for easy binary deployment of C++ addons
BSD 3-Clause "New" or "Revised" License
1.12k stars 263 forks source link

--target should support Node ABI in addition to version #401

Open kkaefer opened 6 years ago

kkaefer commented 6 years ago

Calling node-pre-gyp with the --target parameter currently performs a lookup of Node version and matches that to a particular Node ABI using an internal lookup map. Over in https://github.com/mapbox/cmake-node-module, we're not concerned with Node versions, we only care about the ABI so it'd be cool to be able to pass the ABI version directly.

While we're at it, we could also add support for specifying the N-API ABI with --target.

springmeyer commented 6 years ago

This make sense and would be useful. Are you thinking we should make a new option like --target_abi=57 or try to parse it out of --target=abi-57?

As far as N-API, currently the design of the N-API support from @jschlight is to have multiple builds run automatically based on the napi_versions array. (https://github.com/mapbox/node-pre-gyp#the-napi_versions-array-property) Would that work for your situation? Or would you require the ability to select just one as a command line override?