-
Notifications
You must be signed in to change notification settings - Fork 1.3k
distribute js-ipfs binaries with pkg? #998
Comments
That would be super cool, really like pkg. |
If we were to do this, it would enable jsipfs and goipfs to be tested more easily against the same sharness tests in some CI (//cc @victorbjelkholm). We could also make it available through dist.ipfs.io, although that would be a lesser priority. |
I've tried it out (just run The cli has some missing commands if the binary is run outside of the source folder (all except add, cat, get, completion) and if a repo exists an error occurs because leveldown.node could not be found (pkg for now does not bundle .node files)
|
Oh, the native dependencies! |
Yeah, native dependencies + dynamically loading the CLI commands would put a stop on using pkg... Not super valuable for CI though, more for having a nodejs runtime embedded so it's not necessary to install. |
I've got at least the cli to work. Now all commands appear properly in the help page.
|
The native dependencies issue can be solved by putting the *.node files in the same folder as the ipfs binary and patching the modules so they load it from that location. |
I've got it working. I've created this module that can embed the natives in the binary! Pr coming soon... (first I have to cleanup that messy module) |
PR #1007 |
@mkg20001 thank you for being awesome and proposing an idea and solving the issues to make it happen. I'll close this issue to avoid fragment the discussion and focus on reviewing the PR and idea here #1007 I won't make a call on whether or not to support this but I do hope that by the beginning of October there is clarity. Thanks! |
Anything that isn't a string needs to be passed with `--json`. fixes ipfs#881 Depends on: * [x] ipfs-inactive/interface-js-ipfs-core#470 License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
There is a really cool tool out there (https://github.com/zeit/pkg) that allows nodejs apps to be packaged as binaries.
This would have the following benefits:
The text was updated successfully, but these errors were encountered: