Skip to content

Commit b810466

Browse files
authored
doc: clarify when to use N-API (#849)
* doc: clarify when to use N-API Refs: #684 Signed-off-by: Michael Dawson <[email protected]>
1 parent 528b9f6 commit b810466

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ the use of the C based [N-API](https://nodejs.org/dist/latest/docs/api/n-api.htm
44
provided by Node.js when using C++. It provides a C++ object model
55
and exception handling semantics with low overhead.
66

7+
There are three options for implementing addons: N-API, nan, or direct
8+
use of internal V8, libuv and Node.js libraries. Unless there is a need for
9+
direct access to functionality which is not exposed by N-API as outlined
10+
in [C/C++ addons](https://nodejs.org/dist/latest/docs/api/addons.html)
11+
in Node.js core, use N-API. Refer to
12+
[C/C++ addons with N-API](https://nodejs.org/dist/latest/docs/api/n-api.html)
13+
for more information on N-API.
14+
715
N-API is an ABI stable C interface provided by Node.js for building native
816
addons. It is independent from the underlying JavaScript runtime (e.g. V8 or ChakraCore)
917
and is maintained as part of Node.js itself. It is intended to insulate

0 commit comments

Comments
 (0)