Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detecting NAPI #29

Closed
jjrv opened this issue Dec 7, 2016 · 1 comment
Closed

Detecting NAPI #29

jjrv opened this issue Dec 7, 2016 · 1 comment
Labels

Comments

@jjrv
Copy link

jjrv commented Dec 7, 2016

nbind currently detects Node.js using #ifdef BUILDING_NODE_EXTENSION and Emscripten using #ifdef EMSCRIPTEN. How would I distinguish whether the Node.js version supports NAPI, without using other build tools in the module besides Gyp?

Could there be a macro like NODE_USE_NAPI or similar defined in common.gypi?

@mhdawson
Copy link
Member

I think we discussed and answered this in the meeting last Friday. Once Node supports the API it will be supported in all subsequent versions so checking that version is x or greater should be all that is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants