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.

Leeroy Brun
  • 4,350
  • 2
  • 14
  • 11

1 Answers1

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.

eljefedelrodeodeljefe
  • 4,987
  • 5
  • 23
  • 56