Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Dawson <michael_dawson@ca.ibm.com>2019-08-01 16:51:03 +0300
committerMichael Dawson <michael_dawson@ca.ibm.com>2019-08-16 21:47:27 +0300
commit18405e66d28383ebe930a0dcf1a1a6104d60d79d (patch)
tree4dd72a5f4ef4d89d1959c02bf66ec15479fa52e8 /doc/api/addons.md
parentb9ff6a3fb1db4868473f9b326cb6038f3e1823a9 (diff)
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: https://github.com/nodejs/node/pull/28922 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/addons.md')
-rw-r--r--doc/api/addons.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/api/addons.md b/doc/api/addons.md
index a75d287dce1..b0bb330d32b 100644
--- a/doc/api/addons.md
+++ b/doc/api/addons.md
@@ -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