-
Notifications
You must be signed in to change notification settings - Fork 469
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
Incremental adoption #871
Comments
If you mean being able to use both as part of incremental development, that might be possible by copying some of the wrapping/unwrapping that is done in: src/js_native_api_v8.cc, for example https://github.com/nodejs/node/blob/2da36112d177efc19201f1610dcf51647378131c/src/js_native_api_v8.cc#L144 But if you mean shipping a module that uses both then its not setup for that as marking the modules a an N-API module removes the version safety checks that you need with a Nan/pure native module. |
Thank you @mhdawson I see it is not at all straightforward. Seems like splitting the module would be much easier. |
Hi @kidneysolo, |
@NickNaso that article is a good resource I wonder if there is somewhere in our docs we could add a reference? |
Yes I can insert it on this section of the doc: https://github.com/nodejs/node-addon-api#more-resource-and-info-about-native-addons |
@NickNaso sounds good. |
@kidneysolo thanks for your contribution. |
Hello Everyone,
Is there a way to incrementally adopt node-addon-api in a module which is written with node.h/nan ?
The Init function is exposed through the node.h NODE_MODULE(modname, regfunc) . This legacy module is quite large, cross-platform and spawning several threads (in different ways) so I am not very confident proceeding with a one step rewrite.
The text was updated successfully, but these errors were encountered: