Grab the latest Zig and zls updates with zigrab!
[!note] This repository uses Git LFS to store test cases. Make sure you've got it installed before cloning the repository.
Assuming you have Rust installed,
cargo install --git https://gitlab.com/Lynnesbian/zigrab
# update zig to the latest compatible version. if zig is not installed, this will install it to a sensible location.
zigrab update
# update zls to the latest zig-compatible version.
zigrab zls update
# ok, but what else does it do?
zigrab --help
Consult the directories
crate's documentation;
specifically, the table describing the BaseDirs
;
specificallier, the executable_dir
method; specificalliest, this:
Platform | Location |
---|---|
Windows | None :( |
Linux | $XDG_BIN_HOME or $HOME/.local/bin |
macOS | None :( |
Yes.
Other platforms don't really have a concept of "default binary location".
You can, however, use the --path
flag to specify a custom location:
zigrab update --path C:\Users\billg\bin
I'm open to suggestions.
Zigrab uses a minimal set of small dependencies - larger crates such as reqwest, clap, and serde are avoided in favour of smaller alternatives, even if those alternatives have fewer features or are less ergonomic.
Every dependency listed in Cargo.toml
includes an explanation of why it's there.
There are two optional features, both enabled by default. To disable all default features, use
cargo install --git https://gitlab.com/Lynnesbian/zigrab --no-default-features
If you only want the zls feature but not the minisign feature,
cargo install --git https://gitlab.com/Lynnesbian/zigrab --no-default-features --features zls
Enables updating zls.
Verifies downloaded binaries against the relevant public minisign key. The keys are currently hardcoded into zigrab. The Zig public key is provided on Zig's download page, and the zls public key is provided in the zls release-worker README.
Keys can be validated with the aptly named verify_keys.sh
script.
If this script breaks and/or fails to verify the keys, please
open an issue.
Licensed under the Mozilla Public License 2.0.