doc: clarify node.js addons are c++
PR-URL: https://github.com/nodejs/node/pull/12898 Fixes: https://github.com/nodejs/node/issues/7129 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
parent
631cb42b4e
commit
abfd4bf9df
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
* [Assertion Testing](assert.html)
|
* [Assertion Testing](assert.html)
|
||||||
* [Buffer](buffer.html)
|
* [Buffer](buffer.html)
|
||||||
* [C/C++ Addons](addons.html)
|
* [C++ Addons](addons.html)
|
||||||
* [C/C++ Addons - N-API](n-api.html)
|
* [C/C++ Addons - N-API](n-api.html)
|
||||||
* [Child Processes](child_process.html)
|
* [Child Processes](child_process.html)
|
||||||
* [Cluster](cluster.html)
|
* [Cluster](cluster.html)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# C/C++ Addons
|
# C++ Addons
|
||||||
|
|
||||||
Node.js Addons are dynamically-linked shared objects, written in C or C++, that
|
Node.js Addons are dynamically-linked shared objects, written in C++, that
|
||||||
can be loaded into Node.js using the [`require()`][require] function, and used
|
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
|
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.
|
provide an interface between JavaScript running in Node.js and C/C++ libraries.
|
||||||
@ -26,7 +26,7 @@ involving knowledge of several components and APIs :
|
|||||||
off-loading work via libuv to non-blocking system operations, worker threads
|
off-loading work via libuv to non-blocking system operations, worker threads
|
||||||
or a custom use of libuv's threads.
|
or a custom use of libuv's threads.
|
||||||
|
|
||||||
- Internal Node.js libraries. Node.js itself exports a number of C/C++ APIs
|
- Internal Node.js libraries. Node.js itself exports a number of C++ APIs
|
||||||
that Addons can use — the most important of which is the
|
that Addons can use — the most important of which is the
|
||||||
`node::ObjectWrap` class.
|
`node::ObjectWrap` class.
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ compiled for one version to run on later versions of Node.js without
|
|||||||
recompilation.
|
recompilation.
|
||||||
|
|
||||||
Addons are built/packaged with the same approach/tools
|
Addons are built/packaged with the same approach/tools
|
||||||
outlined in the section titled [C/C++ Addons](addons.html).
|
outlined in the section titled [C++ Addons](addons.html).
|
||||||
The only difference is the set of APIs that are used by the native code.
|
The only difference is the set of APIs that are used by the native code.
|
||||||
Instead of using the V8 or [Native Abstractions for Node.js][] APIs,
|
Instead of using the V8 or [Native Abstractions for Node.js][] APIs,
|
||||||
the functions available in the N-API are used.
|
the functions available in the N-API are used.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user