Next Generation Native Node: N-API in C++

Some time ago, way back in the Node JS 0.10.x days, we needed to expose some native libraries previously written in C++ for use by an existing Node JS based service. There were two reasons to reuse this existing C++ code base. The first being that the code was already written and debugged so wrapping it made a lot of sense from a cost perspective. The second being that the intellectual property was somewhat easier to protect in a binary than it was in a JavaScript module. Fortunately, support for native modules was already available at the time, and we took advantage of them. Over the lifetime of that project, we ended up with a few breaking changes due to the instability of the Node.js Addon API through it’s early releases. Now, 5 years later, the planned backward compatibility support for the newer Node Native API sounds pretty exciting. In this whitepaper, we explore a brief history of the Native Node APIs and a look at the current new standards for native node development as of Node.js v10.
Download Now