Skip to content
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

Feature suggestion: Provide Natively packaged version #251

Closed
MuXiu1997 opened this issue Nov 18, 2021 · 11 comments
Closed

Feature suggestion: Provide Natively packaged version #251

MuXiu1997 opened this issue Nov 18, 2021 · 11 comments

Comments

@MuXiu1997
Copy link

I found when using the Bitwarden CLI that they provide a natively packaged version of

This got me thinking that sometimes, maybe on some machines, I don't want to install node and npm, but would like to have a tool like zx to help me execute scripts easily

So, it's helpful to provide a natively packaged version

Additional context:

Native Executable

We provide natively packaged versions of the CLI for each platform which have no requirements on installing the Node.js runtime. You can obtain these from the downloads section in the documentation.

@antonmedv
Copy link
Collaborator

Yes, this is easy to do. Will do it

@antongolub
Copy link
Collaborator

antongolub commented Nov 18, 2021

+1
@antonmedv, just fyi, this is how we solved a similar case via pkg: https://github.com/qiwi/buildstamp/tree/master/packages/bin

vercel/pkg#1291 :(

@MuXiu1997
Copy link
Author

+1 @antonmedv, just fyi, this is how we solved a similar case via pkg: https://github.com/qiwi/buildstamp/tree/master/packages/bin

Yea~~, Bitwarden CLI also uses pkg

@antonmedv
Copy link
Collaborator

I think it will not be a feature of zx.

@ejdaly
Copy link

ejdaly commented Feb 26, 2022

@antonmedv - I did some work on this a few weeks back, and have pushed a standalone / natively packaged build here:

https://github.com/ejdaly/zx

There are minimal changes to the existing code (it's mostly addition of some devDependencies, and a new build script; I've documented the changes in the code, and here: https://github.com/ejdaly/zx#fork-notes)

The standalone build is feature-complete with the standard version (and passes all existing test cases).

It is based on v4.3.0 however, but I'd be happy to attempt update to v5+ to see how that goes...

If this is a feature you would consider as part of the main zx project - I'm happy to work with you to get this added. If not, that's fine too of course.

Aside: I've also added a few other features to that branch (things I was interested in trying: dynamic import & REPL). I'm not suggesting here that those features be added to main repo (I see there are separate issues here for them; and I'll comment there...)

@antonmedv
Copy link
Collaborator

Nice work! But I'm not thinking to add executable bins to zx right now. The first build process was error-prone and I completely removed it in v5. The second is security concerns.

@ejdaly
Copy link

ejdaly commented Feb 26, 2022

Sure, no problem at all. The build process is documented now in my fork - so people can follow that (or use the binaries directly..) if they have that use case...

Out of interest, what security concerns would you see? Just the idea of running an unsigned / unverified binary?

@antonmedv
Copy link
Collaborator

Yes, this and npm security checks now works really well. In case of a binary no one will be checking it for security holes.

@MuXiu1997
Copy link
Author

@antonmedv
Is it possible to make the binary version available in github's Releases only, without adding it to npm?
pkg also seems to be supporting ES Modules soon

@antongolub
Copy link
Collaborator

antongolub commented Jun 23, 2022

  1. It requires to build n binaries: for x86_64/arm, win/mac/linux
  2. each binary size will be ~90Mb+

@MuXiu1997
Copy link
Author

Yes, but zx is so good that I'm not the only one who wishes it had a single file version that worked straight out of the box and didn't require node to be installed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants