zigup
zigup copied to clipboard
Offer curl-based, pre-compiled, zig-less installation
Yay, a Zig version manager!
Could we get some shell install commands, to help first-time users who may not already have a Zig compiler installed? Similar to how rustup works.
Specifically, the user should not be required to have zig installed at the time zigup is installed. Rather, zigup could obtain a precompiled zig binary and put it in a zigup-friendly place on behalf of the user, so that the user only needs to know how to run a curl command, and zigup does 100% of the rest of the work of preparing zig's. Most version managers work this way.
Yeah I think some equivalent to rustup
would be great.
I'm a bit confused by your wording here though. Zigup doesn't require Zig to be installed to work. If you have a zigup binary, you should be able to use it whether or not zig is installed. That being said, in order to compile zigup
you need a Zig compiler, is that what you meant?
Yes, I think he means that having a binary to download directly from here would be very helpful for new users as they wouldn't even have a zig compiler installed yet.
New users could just download a precompiled zigup binary and go
Ok, I think the tentative plan then is to write a script/tool to compile zigup for the same set of platforms that Zig supports, then creates a set of archives that can be uploaded into a zigup release on github. These versions of zigup should be compiled statically (like the zig
executable) for portability. These archives could be downloaded manually, however, we can also host a shell script that can be piped to curl that will select and download the appropriate zigup archive and extract it for the user.
Note that to support a static version of zigup, we'll need to either compile openssl statically, or use a complete zig implementation for HTTPS. I discovered this project the other day, we may be able to use it: https://github.com/alexnask/iguanaTLS
I have written a library that does just this. It is truemedian/zfetch.
It only requires:
- MasterQ32/zig-network, to provide a system-agnostic socket layer
- MasterQ32/zig-uri, for uri parsing
- truemedian/hzzp my http parser
- and alexnask/iguanaTLS for doing https
So we're fairly close to this goal.
Ok, I think the tentative plan then is to write a script/tool to compile zigup for the same set of platforms that Zig supports, then creates a set of archives that can be uploaded into a zigup release on github.
Would setting up CI to build and upload artifacts for the short term be a possibility?
Would setting up CI to build and upload artifacts for the short term be a possibility?
Yes
Working on it rn :+1: