-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Support for pre-compiled binary modules in npm. #4398
Comments
The following receipt is not an official path of supporting pre-compiled binary modules in npm, but it should work nevertheless.
After that Node-gyp and its requirements (Python, make and gcc or Visual Studio Express and sometimes Windows 7 64bit SDK) would no longer be required on user's side. This is also less ugly on the surface (because the |
@Mithgol any chance to support pre-compiled modules just on some systems but compile from scratch on all other? |
That would likely require some support from @isaacs (in npm's code). Currently (unless I misunderstand something) npm is designed to build the module on all systems if Alternatively you may try to write your |
I think it's not a bad idea to distribute binaries. However I don't think making the module author responsible for all this is a scenario that works. |
What do you suggest then? |
Here's a path for this which was explored a little bit last year, and needs some work to make real some day:
The same infrastructure could be used to run tests, nag authors for bad github repos, or do other fun stuff with packages. |
Yes it would be awesome if we can move this forward. We would love to help. We are having build farm discussions / exploration on this right now. |
@isaacs, for the proposal above would it always download, or have smart detection of if I have the prereqs to build? What if I want the modules to actually build as I am developing a native module? |
Separate tarballs for win32 and win64 should be possible (for smaller downloads). |
Another thing to consider is that we would need separate tarballs for each released version of node. I'd imagine the npm repo would look something like: ...
"win32_x64_0.8.15": {
"tarball":"http://registry.npmjs.org/blah/-/blah-1.2.3-win32_x64_0.8.15.tgz",
... In the ideal world, we would only need versions for minor version changes of node (0.6, 0.8, 0.10, etc.) but in reality the ABI has changed from time to time in between stable patch releases, and the ABI changes often during unstable releases. Obviously we can't support precompiled binaries for every version of node in existence, so that leaves the question of which node versions should be supported and for how long (perhaps the last 2 stable minor versions?). |
I think we have been pretty decent, atleast since 0.8. |
I would say we just allow anyone to upload things. To keep it safe, just tell the user that he/she is about to install binaries provided by Microsoft/Joyent/... and whether the user trusts them. |
Yep, that makes sense. On Wednesday, December 12, 2012, Bert Belder wrote:
|
@isaacs any status on this? |
probably doesn't belong here and discussion should be moved to a duplicate issue here: https://github.com/isaacs/npm/issues/1891 |
Yes, thanks, this is an npm issue, and not one that we'll get to very soon. Closing this. |
Given that the Windows OS is supported for NodeJS and npm, I feel that the biggest hindrance at this point is lack of clear direction on supporting pre-compiled binary modules in npm, or at least a clear direction on how they should be supported.
With windows, there are essentially two versions needed, a 32-bit one, and a 64-bit one. Which is much less diverse than other platforms. I feel strongly that a blessed method for including binaries for windows is very important. Given that in production windows servers, the likelihood of having Python 2.7 and a build environment for C/C++ is extremely unlikely, and that the "global" install path for NPM modules is per user, it stands to reason that having a standard practice for binary modules is very important.
The text was updated successfully, but these errors were encountered: