I'm relatively new to node.js and I have a question about compiling node.js with additional native module. Is there a way to integrate an addon to node.js so that it is ready for use after compile?
node.js source code is here. Some built-in libraries are located in deps/
There is a tutorial for compiling C++ addon as a module of node.js. After compilation of the module a file "myaddon.node" is generated that can be used with require in node.js application.
Is there a way to make the module built-in? I mean I can just compile it together with node.js source code and then deploy to a target machine. So that I can just call
var myaddon = require("myaddon");
without having to run npm install. There are natives modules such as zlib, http, fs that are integrated into node.js.
I found one article where a native module is built for node.js on Windows using Visual Studio. Is there a similar way to build node.js with your own module on Linux?