You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WIDL-NAN enables developers to write a Node.js addon with least knowledge to Node.js addon development.
With this WIDL-NAN tool, developers can work out a Node.js addon using pure C++ to work in problem domain, with least knowledge of v8, Node.js & NAN. To achieve that, developers are supposed to define the API exposed in Node.js environment in Web IDL language.
Typical Use Case
If you're a C++ developer, and you want your C++ API to be exposed in Node.js environment.
Or if you're a Node.js developer, and you have to write something in C++ because it can't be done in pure JavaScript.
If you're not familiar with v8 or Nan
If you don't want to write many lines in NAN notation for every single API in your Node.js addon
Then you might benefit from this WIDL-NAN tool.
Getting Started with WIDL-NAN
To use WIDL-NAN tool, you'll need to do the following
Define your Node.js interface in Web IDL Language, written into a file (or multiple files)
Run WIDL-NAN on that file (or multiple files)
Run node-gyp to build the Node.js addon
Now you'll get a Node.js addon with all the API you defined, but without any real functionalities. It's time you modify the generated skeleton of implementation code, adding the functionalities.
For complete spec and/or examples of Web IDL language, please follow this link.