| Sep | OCT | Nov |
| 25 | ||
| 2019 | 2020 | 2021 |
COLLECTED BY
Collection: github.com
PR-URL: #820 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>826e466
node-addon-api module, which is not part of Node.js, preserves the benefits
of the N-API as it consists only of inline code that depends only on the stable API
provided by N-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.
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 N-API and/or node-addon-api
exclusively and build against a version of Node.js that includes an
implementation of N-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 N-API ABI stability guarantee in particular.
As new APIs are added to N-API, node-addon-api must be updated to provide
wrappers for those new APIs. For this reason node-addon-api provides
methods that allow callers to obtain the underlying N-API handles so
direct calls to N-API and the use of the objects/methods provided by
node-addon-api can be used together. For example, in order to be able
to use an API for which the node-addon-api does not yet provide a wrapper.
APIs exposed by node-addon-api are generally used to create and
manipulate JavaScript values. Concepts and operations generally map
to ideas specified in the ECMA262 Language Specification.
The N-API Resource offers an
excellent orientation and tips for developers just getting started with N-API
and node-addon-api.
●Setup
●API Documentation
●Examples
●Tests
●More resource and info about native Addons
●Badges
●Code of Conduct
●Contributors
●License
node-addon-api is based on N-API and supports using different N-API versions.
This allows addons built with it to run with Node.js versions which support the targeted N-API version.
However the node-addon-api support model is to support only the active LTS Node.js versions. This means that
every year there will be a new major which drops support for the Node.js LTS version which has gone out of service.
The oldest Node.js version supported by the current version of node-addon-api is Node.js 10.x.
npm install
npm test
To avoid testing the deprecated portions of the API run
npm install
npm test --disable-deprecated
--debug option:
npm run-script dev
If you want faster build, you might use the following option:
npm run-script dev:incremental
Take a look and get inspired by our test suite
npm run-script benchmark
See benchmark/README.md for more details about running and adding benchmarks.
node-addon-api to provide more visibility to the community.
Quick links to NPM searches: keywords:node-addon-api.
| Name | GitHub Link |
|---|---|
| Anna Henningsen | addaleax |
| Chengzhong Wu | legendecas |
| Gabriel Schulhof | gabrielschulhof |
| Hitesh Kanwathirtha | digitalinfinity |
| Jim Schlight | jschlight |
| Michael Dawson | mhdawson |
| Kevin Eady | KevinEady |
| Nicola Del Gobbo | NickNaso |
| Name | GitHub Link |
|---|---|
| Arunesh Chandra | aruneshchandra |
| Benjamin Byholm | kkoopa |
| Jason Ginchereau | jasongin |
| Sampson Gao | sampsongao |
| Taylor Woll | boingoing |