Skip to content
Browse files

doc: mention N-API as recommended approach

We've had a few comments that from the doc it might not
be clear that N-API is the recommended approach for Addons.
As a start, mention N-API early in the non N-API section
as the recommended approach unless lower level access
is required.

PR-URL: #28922
Reviewed-By: Richard Lau <>
Reviewed-By: Colin Ihrig <>
Reviewed-By: Luigi Pinca <>
Reviewed-By: Rich Trott <>
Reviewed-By: Trivikram Kamat <>
Reviewed-By: James M Snell <>
  • Loading branch information...
mhdawson authored and targos committed Aug 1, 2019
1 parent aff1ef9 commit edbe38d52d3816627a827fc0346616e033415255
Showing with 7 additions and 1 deletion.
  1. +7 −1 doc/api/
@@ -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 three options for implementing Addons: N-API, nan, or direct
use of internal V8, libuv and Node.js libraries. Unless you need direct
access to functionality which is not exposed by N-API, use N-API.
Refer to the section [C/C++ Addons - N-API](n-api.html)
for more information on N-API.

When not using N-API, implementing Addons is complicated,
involving knowledge of several components and APIs:

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

0 comments on commit edbe38d

Please sign in to comment.
You can’t perform that action at this time.