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 information about Node-API versions >=9 #50168

Closed
wants to merge 15 commits into from
Prev Previous commit
Next Next commit
Update n-api.md
  • Loading branch information
mhdawson committed Oct 17, 2023
commit fd3279c0ee639bcb0058dd77f8d905c1e9471665
10 changes: 5 additions & 5 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,11 @@ versions that support Node-API versions higher than 8 will support all
versions between 8 and the highest version they support and will default
to providing the version 8 APIs unless an addon opts into a
mhdawson marked this conversation as resolved.
Show resolved Hide resolved
higher Node-API version. This approach provides the flexibility
of better optimizing existing Node-API functions while maintaining ABI stability.
Existing addons can continue to run without recompilation using an earlier
version of Node-API. If an addon needs functionality from a newer Node-API
version, changes to existing code and recompilation will be needed to use
those new functions anyway.
of better optimizing existing Node-API functions while
maintaining ABI stability. Existing addons can continue to run without
mhdawson marked this conversation as resolved.
Show resolved Hide resolved
recompilation using an earlier version of Node-API. If an addon
mhdawson marked this conversation as resolved.
Show resolved Hide resolved
needs functionality from a newer Node-API version, changes to existing
code and recompilation will be needed to use those new functions anyway.

In versions of Node.js that support Node-API version 9 and later, defining
`NAPI_VERSION=X` and using the existing addon initialization macros will bake
mhdawson marked this conversation as resolved.
Show resolved Hide resolved
Expand Down