Back in April I mentioned that the N-API PR had landed in master

For Node.js it is sometimes necessary to allow code written in C/C++ to be called from a JavaScript application.  The existing implementation of this API requires that a native module be compiled specifically for the Node.js version that it will run with.  For example, if you wanted to distribute a binary for your native module you would have to build/ship separate versions for Node.js version 4.x, 6.x, and so on.  In addition, since the existing implementation exposes v8 internals, you may also need to update the code within your module for each version of Node.js that has an updated v8 level (every major version).

A related issue is that the tight binding of the module and Node.js itself to v8 also makes it harder for alternate VM implementations to support Node.js and its modules.

The work on N-API (as a new API for building native addons) looks to address these issues.

When the initial N-API PR landed we still had some work to do on the testing and documentation front but the N-API team has been working hard between now and then.

First the documentation was landed.  You can see it here:

Now the code coverage has gone over 90%:

Look here for more details.

These are 2 great milestone along the way for N-API.

Thanks to all those who continue to help out in contributing and review contributions to N-API.  I’m looking forward to seeing it fully embraced when Node Version 8 is released.

Join The Discussion

Your email address will not be published. Required fields are marked *