napi_generator/examples/napitutorials/doc/apiguide
wangshi 5c47a80cfd fix codecheck
Signed-off-by: wangshi <wangshi@kaihong.com>
2024-04-26 17:10:07 +08:00
..
addon.md add doc 2024-04-26 15:45:01 +08:00
array_buffer.md fix codecheck 2024-04-26 16:39:14 +08:00
array.md fix codecheck 2024-04-26 16:16:17 +08:00
async_context.md add doc 2024-04-26 15:45:01 +08:00
async_operations.md add doc 2024-04-26 15:45:01 +08:00
async_worker_variants.md add doc 2024-04-26 15:45:01 +08:00
async_worker.md add doc 2024-04-26 15:45:01 +08:00
bigint.md add doc 2024-04-26 15:45:01 +08:00
boolean.md add doc 2024-04-26 15:45:01 +08:00
buffer.md add doc 2024-04-26 15:45:01 +08:00
callback_scope.md add doc2 2024-04-26 15:49:38 +08:00
callbackinfo.md add doc2 2024-04-26 15:49:38 +08:00
checker-tool.md add doc2 2024-04-26 15:49:38 +08:00
class_property_descriptor.md add doc2 2024-04-26 15:49:38 +08:00
cmake-js.md fix codecheck 2024-04-26 16:39:14 +08:00
conversion-tool.md add doc2 2024-04-26 15:49:38 +08:00
dataview.md fix codecheck 2024-04-26 16:39:14 +08:00
date.md add doc2 2024-04-26 15:49:38 +08:00
env.md add doc2 2024-04-26 15:49:38 +08:00
error_handling.md fix codecheck 2024-04-26 16:39:14 +08:00
error.md fix codecheck 2024-04-26 16:39:14 +08:00
escapable_handle_scope.md add doc2 2024-04-26 15:49:38 +08:00
external_buffer.md fix codecheck 2024-04-26 16:16:17 +08:00
external.md add doc2 2024-04-26 15:49:38 +08:00
function_reference.md add doc3 2024-04-26 15:51:03 +08:00
function.md add doc3 2024-04-26 15:51:03 +08:00
generator.md fix codecheck 2024-04-26 16:39:14 +08:00
handle_scope.md add doc3 2024-04-26 15:51:03 +08:00
hierarchy.md fix codecheck 2024-04-26 16:39:14 +08:00
instance_wrap.md add doc3 2024-04-26 15:51:03 +08:00
maybe.md add doc3 2024-04-26 15:51:03 +08:00
memory_management.md add doc3 2024-04-26 15:51:03 +08:00
name.md add doc3 2024-04-26 15:51:03 +08:00
node-gyp.md fix codecheck 2024-04-26 16:39:14 +08:00
number.md add doc3 2024-04-26 15:51:03 +08:00
object_lifetime_management.md add doc4 2024-04-26 15:52:43 +08:00
object_reference.md add doc4 2024-04-26 15:52:43 +08:00
object_wrap.md fix codecheck 2024-04-26 16:39:14 +08:00
object.md add doc4 2024-04-26 15:52:43 +08:00
prebuild_tools.md fix codecheck 2024-04-26 16:39:14 +08:00
promises.md add doc4 2024-04-26 15:52:43 +08:00
property_descriptor.md fix codecheck 2024-04-26 16:16:17 +08:00
propertylvalue.md add doc4 2024-04-26 15:52:43 +08:00
range_error.md add doc6 2024-04-26 15:58:22 +08:00
README.md fix code check 2024-04-26 16:53:54 +08:00
reference.md add doc6 2024-04-26 15:58:22 +08:00
setup.md fix codecheck 2024-04-26 17:10:07 +08:00
string.md add doc6 2024-04-26 15:58:22 +08:00
symbol.md add doc6 2024-04-26 15:58:22 +08:00
syntax_error.md add doc6 2024-04-26 15:58:22 +08:00
threadsafe_function.md add doc6 2024-04-26 15:58:22 +08:00
threadsafe.md fix codecheck 2024-04-26 16:16:17 +08:00
type_error.md add doc6 2024-04-26 15:58:22 +08:00
type_taggable.md add doc6 2024-04-26 15:58:22 +08:00
typed_array_of.md fix codecheck 2024-04-26 16:39:14 +08:00
typed_array.md fix codecheck 2024-04-26 16:39:14 +08:00
typed_threadsafe_function.md add doc6 2024-04-26 15:58:22 +08:00
value.md add doc7 2024-04-26 15:58:51 +08:00
version_management.md add doc7 2024-04-26 15:58:51 +08:00

node-addon-api Documents

Node-API is an ABI stable C interface provided by Node.js for building native addons. It is independent of the underlying JavaScript runtime (e.g. or ChakraCore) and is maintained as part of Node.js itself. It is intended to insulate native addons from changes in the underlying JavaScript engine and allow modules compiled for one version to run on later versions of Node.js without recompilation.

The node-addon-api module, which is not part of Node.js, preserves the benefits of the Node-API as it consists only of inline code that depends only on the stable API provided by Node-API. As such, modules built against one version of Node.js using node-addon-api should run without having to be rebuilt with newer versions of Node.js.

Setup

API Documentation

The following is the documentation for node-addon-api.

Examples

Are you new to node-addon-api? Take a look at our examples

ABI Stability Guideline

It is important to remember that other Node.js interfaces such as libuv (included in a project via #include <uv.h>) are not ABI-stable across Node.js major versions. Thus, an addon must use Node-API and/or node-addon-api exclusively and build against a version of Node.js that includes an implementation of Node-API (meaning an active LTS version of Node.js) in order to benefit from ABI stability across Node.js major versions. Node.js provides an ABI stability guide containing a detailed explanation of ABI stability in general, and the Node-API ABI stability guarantee in particular.

More resource and info about native Addons

There are three options for implementing addons: Node-API, nan, or direct use of internal , libuv, and Node.js libraries. Unless there is a need for direct access to functionality that is not exposed by Node-API as outlined in C/C++ addons in Node.js core, use Node-API. Refer to C/C++ addons with Node-API for more information on Node-API.

As node-addon-api's core mission is to expose the plain C Node-API as C++ wrappers, tools that facilitate n-api/node-addon-api providing more convenient patterns for developing a Node.js add-on with n-api/node-addon-api can be published to NPM as standalone packages. It is also recommended to tag such packages with node-addon-api to provide more visibility to the community.

Quick links to NPM searches: keywords:node-addon-api.

Other bindings