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

doc: mention N-API as recommended approach #28922

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion doc/api/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ can be loaded into Node.js using the [`require()`][require] function, and used
just as if they were an ordinary Node.js module. They are used primarily to
provide an interface between JavaScript running in Node.js and C/C++ libraries.

At the moment, the method for implementing Addons is rather complicated,
There are currently two options for implementing Addons: N-API or direct
mhdawson marked this conversation as resolved.
Show resolved Hide resolved
use of internal V8, libuv and Node.js libraries. Unless you need direct
access to functionality which is not exposed by N-API, N-API is the
mhdawson marked this conversation as resolved.
Show resolved Hide resolved
recommended approach. Refer to the section [C/C++ Addons - N-API](n-api.html)
mhdawson marked this conversation as resolved.
Show resolved Hide resolved
for more information on N-API.

When not using N-API, the method for implementing Addons is rather complicated,
mhdawson marked this conversation as resolved.
Show resolved Hide resolved
involving knowledge of several components and APIs:

- V8: the C++ library Node.js currently uses to provide the
Expand Down