-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, Prebuilders #1
Comments
Hi! And thanks for spearheading this! ❤️ Some BackgroundCurrently there are several different approaches as how to handle prebuilt binaries, I believe @mafintosh started working on For this purpose I think simplicity is a key feature. It should be easy to set up and use. We have used
Whenever the user installs a module that depends on a native module with prebuilt binaries, it can use |
@zeke Some projects using this setup https://www.npmjs.com/browse/depended/prebuild Also, @mafintosh has been working on Check out I think this is the way we want to go, i.e. @mafintosh Please correct me if I'm wrong here |
Please let me know if anyone wants to be invited to the organization. I also think that everyone should be owner since it enables people and removes useless friction :) |
This good info. Ty |
🖖 I would be interested in helping. The model I'm most familiar with is electron-prebuilt, which is fantastic for the sake of avoiding building from source on every install. Does tarballing every target distro and including that on npm mean incurring a significant download size increase for all users? Is this preferable to a postinstall script which is sometimes gross and side-effecty? Happy to experiment and come up with a good strategy, or to help recruit other projects into adopting prebuild. leveldb, node-sass, sqlite seem like big communities that would benefit from prebuilds a great deal. I look forward to a day when I don't see an install fail because of a weird node-gyp race condition. |
At first glance it might look significant. If you take a look at the binaries for [email protected], there are roughly 50 files and each is around 200kb, so it's like 10Mb (just rough calculations here). It's worth noting here that npm caches modules, so in theory it should be really fast for consecutive downloads. Although we trade off some disk space for it. But there's ways to reduce this total size (@mafintosh can pitch in on details here), if need to be. If you're writing a simple c++ layer yourself it might not be worth it, but in the |
Hey, nice to see some action regarding the org :) @ralphtheninja there are even more projects using prebuild https://www.npmjs.com/browse/depended/prebuild does not list the projects where prebuild is a devDependency. Try https://www.npmjs.com/browse/depended/prebuild-install instead. |
I'm using |
@ungoldman I created a list of packages that depend on |
Ha! Me too. |
Nice and I see your list is missing scoped packages (~400) as well. I didn't find a way to bring the npm rest api to list these. And you check the devDependencies 👍 |
Ah thanks for noticing. I'm collecting scoped packages but was not rendering them in the README. The skimdb.npmjs.com service doesn't serve up scoped packages, but the new-ish replicate.npmjs.com service does. My package-stream module and the underlying changes-stream make it pretty easy to consume metadata from that new endpoint. Working on an updated list now.. |
Thanks for getting the discussion started! We've been using A complaint we sometimes get is that Has anybody already tried N-API and will it be able to work across Node and Electron? |
Hmm.. that's odd, because |
Thinking about this again it may be the combination of Atom's package installer with prebuild-install that made it fail. I'll try to find the relevant issue. 👍 |
Oh I missed the N-API part.. I watched the N-API repo and IMHO it is far away from being ready for production use. |
Would definitely be keen to reach a better place in node / electron land for prebuilt modules. If we can come up with some kind of system that removes peoples dependencies on tools like electron-rebuild then that's a win in my book. Quick thoughts on some discussions here, I'd personally prefer to avoid shiping the prebuilt binaries for native modules inside an NPM module, because a) it increases download time and b) it will increase things like Electron app size (unless users go through and delete the ones they don't need during packaging). Optimum for me is just a ridiculously simple to use module that uploads binaries to GitHub releases and downloads them on install. This is basically On the topic of that last idea, the main problem with native modules in the current node world is that tools like |
Would be nice to have that list with metadata on what type of system is being used. Could use some simple heuristics to guess from |
Loads of interesting input in this thread. Keep it up! I was thinking about |
https://github.com/nice-registry/native-modules#readme now includes scoped modules. |
I turned
Will packages that (dev)depend on |
Not necesarily if they use directly the v8 APIs (deprecated behaviour) or the new N-API. |
I've updated native-modules to collect all modules that depend (or devDepend) on any of the following: And here are some new lists based on the data: |
Wooo! 👏👏👏 |
I don't find the NodeOS related ones on this list... :'-( Does it has the list a limit in downloads count or something? |
@piranna it should be every dependent of |
@piranna I just re-ran the collector. Let me know if your npm-published modules are still missing from the list. |
There's a |
|
|
Asked @juliangruber to move |
NodeOS itself is not published, but its layer projects are. I have review the list again and they are still not included. One of them is nodeos-initramfs, that has |
We should probably check for both to cover projects that haven't upgraded to use
|
I agree. |
There was a I've also updated it to includes all modules that somehowDependOn |
That's great, thank you! :-D |
I had a good laugh when I saw the "Home Prebuilders Association", but I think |
As long as it maintains it's lego avatar |
Going off what I said before about making this as easy as possible for native module owners to set up --> It's a pretty simple CLI tool that:
The result of running it on your code looks something like this |
Nice! :-D |
Oh hell yes! I need to be a part of this, can I be a party of this? |
@wmhilton I sent you an invitation to join the org. I've been busy this week, but my plan is to come up with an "action item" list for getting this org into a happy shape. Off the top of my head, that includes:
|
sounds good @zeke! thanks for staying on top of things. would you mind sending me an invite too? |
Copying related conversation from #dat on freenode at @ralphtheninja's request:
(unrelated chat history removed) |
Great! :-D
Yes, that's the reason why we should still try to promote people to use Github to store standalone prebuild images instead of bundling them inside npm packages. This is easier because people don't need to configure the Github token, but can cause problems if it's enabled by default. Maybe still left Github as default and show a warning to use a flag to explicitly bundle the prebuild images? |
@ungoldman it looks like someone invited you already. :) |
Maybe we could even use WebTorrent to reduce the burden of distributing binaries? I made a thing last week that creates torrents from a Github release. From a purely technical point of view, I think the total disk space requirements of prebuilding all the native modules would be within reason for individuals or companies to host mirrors. Even if they all take up 10gb, there's only ~3000 of them (according to zeke's list), so we're only talking ~30TB. |
This is f*cking cool! Thanks for the link! :-D |
Or npm for dat https://github.com/mafintosh/dat-npm? Would be really sweet to have a decentralized build system, where you can build locally for e.g. linux or whatever and sign it, which is what dat does. |
@piranna Thanks for moving, renaming etc! Lets keep the original "Home Prebuilders Association" on the organization page though :) |
This is awesome to see, thanks for organizing a collective around prebuilds. 😄 |
Hi y'all, I created an up-to-date list of modules, similar to @zeke's: |
Found about this org via hypermodules/hyperamp#194 (comment)
I don't really know anything about C++, nan, n-api, node-pre-gyp, or any of the other jazz that goes into native node modules. I am, however, willing to help in an organized effort to improve the native module experience for end-users of node, such that they are scarcely aware of their very existence.
So... how do we get to native module utopia?
The text was updated successfully, but these errors were encountered: