Compile Extension Module into node.exe

35 views
Skip to first unread message

Mike Parsons

unread,
Nov 15, 2012, 2:56:31 PM11/15/12
to nod...@googlegroups.com
Is there a way to compile a custom extension module (i.e. https://github.com/developmentseed/node-sqlite3) directly into the node.exe?

Ben Noordhuis

unread,
Nov 15, 2012, 3:46:45 PM11/15/12
to nod...@googlegroups.com
On Thu, Nov 15, 2012 at 8:56 PM, Mike Parsons <mike.r....@gmail.com> wrote:
> Is there a way to compile a custom extension module (i.e.
> https://github.com/developmentseed/node-sqlite3) directly into the node.exe?

Yes, but it's not supported so it might break anytime you upgrade. In
no particular order:

- drop your code in src/ and lib/
- add your files to node.gyp
- patch src/node_extensions.h

Files in lib/ are loaded with require(), files in src/ with process.binding().
Reply all
Reply to author
Forward
0 new messages