node/tools
Jason Ginchereau a9562fe30c n-api: add support for abi stable module API
Add support for abi stable module API (N-API) as "Experimental feature".
The goal of this API is to provide a stable Node API for native
module developers. N-API aims to provide ABI compatibility guarantees
across different Node versions and also across different
Node VMs - allowing N-API enabled native modules to just work
across different versions and flavors of Node.js without recompilation.

A more detailed introduction is provided in:
https://github.com/nodejs/node-eps/blob/master/005-ABI-Stable-Module-API.md
and https://github.com/nodejs/abi-stable-node/blob/doc/VM%20Summit.pdf.

The feature, during its experimental state, will be guarded by a runtime
flag "--napi-modules". Only when this flag is added to the command line
will N-API modules along with regular non N-API modules be supported.

The API is defined by the methods in "src/node_api.h" and
"src/node_api_types.h". This is the best
starting point to review the API surface. More documentation will follow.

In addition to the implementation of the API using V8, which is included
in this PR, the API has also been validated against chakracore and that
port is available in
https://github.com/nodejs/abi-stable-node/tree/api-prototype-chakracore-8.x.

The current plan is to provide N-API support in versions 8.X and 6.X
directly. For older versions, such as 4.X or pre N-API versions of 6.X,
we plan to create an external npm module to provide a migration path
that will allow modules targeting older Node.js versions to use the API,
albeit without getting the advantage of not having to recompile.

In addition, we also plan an external npm package with C++ sugar to
simplify the use of the API. The sugar will be in-line only and will
only use the exported N-API methods but is not part of the N-API
itself. The current version is in:
https://github.com/nodejs/node-api.

This PR is a result of work in the abi-stable-node repo:
https://github.com/nodejs/abi-stable-node/tree/doc,
with this PR being the cumulative work on the api-prototype-8.x
branch with the following contributors in alphabetical order:

Author: Arunesh Chandra <arunesh.chandra@microsoft.com>
Author: Gabriel Schulhof <gabriel.schulhof@intel.com>
Author: Hitesh Kanwathirtha <hiteshk@microsoft.com>
Author: Ian Halliday <ianhall@microsoft.com>
Author: Jason Ginchereau <jasongin@microsoft.com>
Author: Michael Dawson <michael_dawson@ca.ibm.com>
Author: Sampson Gao <sampsong@ca.ibm.com>
Author: Taylor Woll <taylor.woll@microsoft.com>
Backport-PR-URL: https://github.com/nodejs/node/pull/19447
PR-URL: https://github.com/nodejs/node/pull/11975
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-04-16 17:45:48 -04:00
..
bootstrap tools: add Boxstarter script 2017-12-19 23:03:57 +00:00
configure.d tools: fix AttributeError: __exit__ on Python 2.6 2018-02-12 19:28:27 -05:00
doc doc: linkify missing types 2018-03-29 23:25:37 -04:00
eslint tools: update to ESLint 4.3.0 2017-09-05 12:50:01 -04:00
eslint-rules tools: add number-isnan rule 2018-02-26 22:56:42 -05:00
gyp gyp: implement LD/LDXX for ninja and FIPS 2017-09-05 12:49:56 -04:00
icu tools: add missing #include "unicode/putil.h" 2017-08-15 20:57:21 -07:00
macos-installer tools, build: refactor macOS installer 2018-02-12 19:28:07 -05:00
msvs build,win: fix python detection script 2017-09-05 12:49:51 -04:00
pkgsrc
rpm
certdata.txt tools: update certdata.txt 2018-03-27 23:37:41 -04:00
check-imports.py tools: rewrite check-install.sh in python 2016-04-26 12:16:36 -07:00
compress_json.py src: add /json/protocol endpoint to inspector 2016-09-30 11:17:48 -04:00
cpplint.py tools: fix cpplint.py when path contains non-ascii 2017-11-28 13:10:49 +09:00
create_android_makefiles
create_expfile.sh build: fix dependencies on AIX 2016-09-09 11:06:09 -04:00
genv8constants.py
getmoduleversion.py build: configure --shared 2016-07-05 22:16:23 +02:00
getnodeversion.py build: configure --shared 2016-07-05 22:16:23 +02:00
gyp_node.py build: reduce one level of spawning in node_gyp 2017-08-15 20:57:22 -07:00
install.py n-api: add support for abi stable module API 2018-04-16 17:45:48 -04:00
js2c.py src: support UTF-8 in compiled-in JS source files 2017-03-08 17:10:40 -08:00
license-builder.sh tools: update license-builder.sh for v8_inspector 2016-08-11 15:21:32 -04:00
license2rtf.js tools: update ESLint to current version 2017-03-08 17:11:24 -08:00
lint-js.js tools: avoid using process.cwd in tools/lint-js 2017-12-19 15:41:38 -05:00
lsan_suppressions.txt
macosx-firewall.sh tools: add macosx-firwall script to avoid popups 2017-01-31 17:07:44 -05:00
make-v8.sh v8: update make-v8.sh to use git 2016-11-10 17:53:29 -05:00
Makefile
mk-ca-bundle.pl tools: output include guards in mk-ca-bundle.pl 2016-07-05 22:11:42 +02:00
mkssldef.py build: export zlib symbols on Windows 2016-08-10 12:50:04 -04:00
osx-codesign.sh build,tools: do not force codesign prefix 2017-09-05 12:49:58 -04:00
osx-pkg-postinstall.sh
osx-productsign.sh
package-lock.json tools: update to ESLint 4.1.0 2017-09-05 12:49:48 -04:00
release.sh tools: add custom private key option 2017-09-20 14:50:29 -04:00
run-valgrind.py tools: make run-valgrind.py useful 2016-12-13 15:43:04 -05:00
sign.bat win,build: try multiple timeservers when signing 2016-10-19 00:57:32 +11:00
specialize_node_d.py tools: remove unnecessary imports and assignments 2016-07-13 06:50:48 -05:00
test-npm.sh
test.py n-api: add support for abi stable module API 2018-04-16 17:45:48 -04:00
update-authors.sh
update-eslint.sh tools: fix update-eslint.sh 2017-09-20 11:28:01 -04:00
utils.py