Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Add initial documentation for N-API #12549

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
68ea642
doc: Add initial documentation for N-API
mhdawson Apr 19, 2017
049c9b6
squash: address first set of comments
mhdawson Apr 21, 2017
67c7191
squash: address more comments
mhdawson Apr 21, 2017
f4417ef
squash: address next set of comments
mhdawson Apr 24, 2017
d32ce36
squash: e ->env where appropriate
mhdawson Apr 24, 2017
250bbe1
squash: update initial references to functions in Exceptions
mhdawson Apr 24, 2017
65e5865
squash: replace references to functions with links - Object lifetime
mhdawson Apr 24, 2017
f1b2a4d
squash: remove sub headings for API function sections
mhdawson Apr 24, 2017
cb616df
squash: misc cleanup
mhdawson Apr 24, 2017
2e4f2fd
squash: more cleanup
mhdawson Apr 24, 2017
e00bae1
squash: add in when added metadata
mhdawson Apr 24, 2017
13aeecd
squash: make references to functions links in Async section
mhdawson Apr 24, 2017
942a250
squash: one more cleanup pass
mhdawson Apr 24, 2017
017ed87
squash: add information about truncation of 32 bit ints
mhdawson Apr 24, 2017
a60ce7c
squash: address new linter failures
mhdawson Apr 25, 2017
0ec57fd
squash: remove double spaces in [in/out]
mhdawson Apr 25, 2017
eaea6c0
squash: remove low level headers in struct definitions
mhdawson Apr 25, 2017
a9702e7
squash: Make parameter descriptions use regular grammar
mhdawson Apr 25, 2017
5bb5431
squash: fix problems visible in html version of docs
mhdawson Apr 25, 2017
3332195
squash: address additional comment
mhdawson Apr 25, 2017
6a461c0
squash: fix up formating of structure member definitions
mhdawson Apr 25, 2017
0225b29
squash: address latest comments
mhdawson Apr 26, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/api/_toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* [Assertion Testing](assert.html)
* [Buffer](buffer.html)
* [C/C++ Addons](addons.html)
* [C/C++ Addons - N-API](n-api.html)
* [Child Processes](child_process.html)
* [Cluster](cluster.html)
* [Command Line Options](cli.html)
Expand Down
20 changes: 20 additions & 0 deletions doc/api/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,26 @@ Addon developers are recommended to use to keep compatibility between past and
future releases of V8 and Node.js. See the `nan` [examples][] for an
illustration of how it can be used.


## N-API

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should include the Experimental stability index flag here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, we have that in the actual section on n-api but I can add here as well

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having it in both places is good.

> Stability: 1 - Experimental

N-API is an API for building native Addons. It is independent from
the underlying JavaScript runtime (ex V8) and is maintained as part of
Node.js itself. This API will be Application Binary Interface (ABI) stable
across version of Node.js. It is intended to insulate 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. Addons are built/packaged with the same approach/tools
outlined in this document (node-gyp, etc.). 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, the functions available
in the N-API are used.

The functions available and how to use them are documented in the
section titled [C/C++ Addons - N-API](n-api.html).

## Addon examples

Following are some example Addons intended to help developers get started. The
Expand Down
Loading