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

Choice between NAN and node-addon-api #684

Closed
legendecas opened this issue Mar 17, 2020 · 4 comments
Closed

Choice between NAN and node-addon-api #684

legendecas opened this issue Mar 17, 2020 · 4 comments

Comments

@legendecas
Copy link
Member

I've heard complaints that it's not clear which one is recommended in one specific scenario(NAN is still very useful if add-on is going to use v8's or libuv's APIs that are not exposed through N-API) to persons who are completely new to Node.js add-on development.

Searched on either node-addon-api's README and NAN's, also on google, there is no clear statement about this topic.

@mhdawson
Copy link
Member

There is a recommendation in https://github.com/nodejs/node/blob/master/doc/api/addons.md#c-addons to use N-API unless you need functionality that it does not expose.

@mhdawson
Copy link
Member

In discussion in the last N-API team meeting suggestion from @legendecas was that we take some of the text from the existing Node doc and to the node-addon-api repo.

mhdawson added a commit to mhdawson/node-addon-api that referenced this issue Dec 7, 2020
Refs: nodejs#684

Signed-off-by: Michael Dawson <mdawson@devrus.com>
@mhdawson
Copy link
Member

mhdawson commented Dec 7, 2020

PR to address: #849

mhdawson added a commit that referenced this issue Dec 9, 2020
* doc: clarify when to use N-API

Refs: #684

Signed-off-by: Michael Dawson <mdawson@devrus.com>
@mhdawson
Copy link
Member

mhdawson commented Dec 9, 2020

PR landed closing.

@mhdawson mhdawson closed this as completed Dec 9, 2020
kevindavies8 added a commit to kevindavies8/node-addon-api-Develop that referenced this issue Aug 24, 2022
* doc: clarify when to use N-API

Refs: nodejs/node-addon-api#684

Signed-off-by: Michael Dawson <mdawson@devrus.com>
Marlyfleitas added a commit to Marlyfleitas/node-api-addon-Development that referenced this issue Aug 26, 2022
* doc: clarify when to use N-API

Refs: nodejs/node-addon-api#684

Signed-off-by: Michael Dawson <mdawson@devrus.com>
wroy7860 added a commit to wroy7860/addon-api-benchmark-node that referenced this issue Sep 19, 2022
* doc: clarify when to use N-API

Refs: nodejs/node-addon-api#684

Signed-off-by: Michael Dawson <mdawson@devrus.com>
johnfrench3 pushed a commit to johnfrench3/node-addon-api-git that referenced this issue Aug 11, 2023
* doc: clarify when to use N-API

Refs: nodejs/node-addon-api#684

Signed-off-by: Michael Dawson <mdawson@devrus.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants