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 <https://github.com/joyent/node>. Some built-in 
libraries are located in deps/


There is a tutorial <https://nodejs.org/api/addons.html> 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 
<http://joseoncode.com/2012/04/10/writing-your-first-native-module-for-node-dot-js-on-windows/>
 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?

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/f039ffa7-e0a1-4aaa-8a0e-a6216e9c0a5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to