nodejs C++ modules

_kabal_

Executive Member
Joined
Oct 24, 2005
Messages
8,281
Reaction score
4,555
So, anyone ever written any c++ modules for nodejs?

We have a cross platform desktop application written in javascript/nodejs running in a node-webkit container.

I need to write a "sensitive" part of the application in a c++ module.

I have already recompiled another c++ module using nw-gyp ( a fork of node-gyp), and that works well enough inside our app.

some questions:

1. can I write the entire module in "vanilla" c++, and then just wrap the entry and exit points in "V8 stuff"
2. what if I want to use sqlite inside the module? do I use a nodejs sqlite module, or a "native" c++ library?
 
Yes vanilla c++ is fine. You can use sqllite, but the nodejs sqlite already uses the sqlite library I believe.
 
getting there, slowly :)

the nan library is a big help though.
 
Last edited:
Just watch out for code style and limitations. I hit them very fast.
 
Top
Sign up to the MyBroadband newsletter
X