node-gyp build library dependencies
Asked Answered
G

1

7

I want to find a way to simplify the installation of the Node.js "libtorrent" module.

My goal is to be able to provide pre-compiled .node files for each architectures, as this is done in the fibers module for example.

This way, the users can install the module without the need to install dependencies, compile, etc.

My question is : if I want to do that, do I need to include all dependencies (libtorrent and some Boost libaries) inside the project and build them with node-gyp too ? Or if I build the module on my system with these dependencies installed, they will be included in the final .node file ?

Thanks for your help.

Genic answered 7/2, 2014 at 9:47 Comment(0)
N
0

Since Boost and Node are C++ programs their (e.g. function) names get mangled at compile time. When they will not be compiled together, they should theoretically not be able to know of one another. .node files are some binary format and gyp has no functionality, that I know of, that can associate binary symbols.

So I am pretty sure you need to compile them at dev time. I think this would also support your general idea of providing pre-compiled stuff, though tremendously increasing file-size of course.

Nadya answered 14/9, 2015 at 0:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.