Search code examples
c++node.jsnode-ffi

How to use C++ api in nodejs?


I would like to use the C++ API of a project from Node and I can't change the C++ code.
I looked at node-ffi but it doesn't seems to be able to work with C++ namespace and classes.

Do you know any other way?


Solution

  • SWIG can wrap c++ for many scripting languages, including javascript/nodejs. See http://www.swig.org/Doc3.0/Javascript.html