zeromq.node
zeromq.node copied to clipboard
Static link zmq
It would be nice if the zeromq library was statically linked into the node binding. this would reduce the amount of install problems
I agree it would resolve most issues people have, and would allow us to stay uptodate with ZMQ's releases independent of peoples' environments (whether that's a positive or a negative can be debated).
Arguments for or against welcome!
so like a pre-compilied lib directory with a .a
file of libzmq for every single platform and architecture where iojs/node gets shipped? damn.. we'll probably need a speadsheet for starters..
if we supported a matrix of zmq versions, shit, that npm package would be among the fatest and largest known downloads on npm. but potentially everyone would be happy. imagine no matter where node works you could hit the ground running with a bunch of zmq sockets and no trouble. sounds like paradise :palm_tree:
i guess we could potentially combat the fatness by breaking it up into subpackages with platform specific static libs that the install script just somehow figures out how to pull down accordingly, or dont even use npm, but maybe do tagged releases on github and download them from a shell script like how nvm works... is that what we're talking about here?
Rather than static linking, bundling the source could work. But it's GPL, so I'm guessing that would not be legal. We could also do what node-sqlite3 seems to do, which is download it and build it on demand.
I am for the bundling the source, and downloading on demand for avoid GPL issues. We use zeromq.node in a distributed system and the deploy systems vary, it would also simplify our docker version as would not have to install any additional packages.
I could try and work on this and provide a pull request, though my experience in this type of thing is limited.
by all means! and at that point i think we'd need to bump this repo to version 3
Ok, I have started work on a commit regarding linking local version of libzmq downloaded and compiled for OS X (my default os)
@reqshark a bump would be appropriate. By the way, this would be a great opportunity to unify the Windows and *Nix flavors of this module.
@ronkorving is the windows version separate from this module? also what would be your opinions on using node-pre-gyp to supply precompiled library
I have no knowledge on that, so no opinion yet either. Regarding Windows, see: https://github.com/JustinTulloss/zeromq.node/tree/master/windows
Thanks
Node-pre-gyp seems like a good solution for many problems of this nature. @springmeyer would you recommend using node-pre-gyp for this purpose?
:+1: for node-pre-gyp. I'd love to see pre-built binaries available for zeromq.node, to make installation easier for all my packages that rely on it in primarily desktop applications (Electron based).
Rather than static linking, bundling the source could work. But it's GPL, so I'm guessing that would not be legal.
libzmq's license is "LGPL with a static linking exception", i.e. static linking should be treated the same as dynamic linking. A binary that statically links libzmq specifically does not inherit LGPL.
Ah, you're right. That's great.