WiringPi / WiringPi-Node

Node.js bindings to wiringPi
333 stars 94 forks source link

[Proposal] Switch to Nan #60

Open NoHomey opened 7 years ago

NoHomey commented 7 years ago

Node.js just released 7.0.0 and marked 6.9.1 as stable. In answer of this I suggest to switch addon.h from "manual Node.js version Addon absraction" to Native Abstractions for Node.js. Nan is the defacto standart for writing Node.js Addons and to keep compatibility between past and future releases of V8 and Node.js. I've used nan in some of my projects and is really easy to use. It will help to remove all redundancies from the macros and make them cleaner. Nan also provides some macros like NAN_METHOD to make the life of Addon developers easier.

I want to move the project to Nan because I've tried to build it with 6.9.0 version of Node.js last night and failed due to too many required changes needed (mainly to addon.h), as well to make it easier for wiring-pi to run on newer versions of Node.js. Not to mention that Node.js releases vulnerability bug fixes mainly for the LTS and Future rich versions, which as I state right now are 6.9.1 and 7.0.0.

nekuz0r commented 7 years ago

Switching to NaN is already a work in progress :)