Zig plugin for the asdf version manager.
As a bonus, this plugin supports installing zls as well, so zls and zig version can match exactly.
bash,python3,tar, and POSIX utilities.- asdf 0.16+
After installing asdf, install the plugin by running:
asdf plugin add zig https://github.com/asdf-community/asdf-zig.gitor update an existing installation:
asdf plugin update zigThen use asdf-zig to manage zig:
# Show all installable versions
asdf list all zig
# Install specific version
asdf install zig 0.16.0
# or install latest tagged version with
asdf install zig latest
# Set a version globally (on your ~/.tool-versions file)
asdf set --home zig latest
# Now zig commands are available
zig version
# You can also check the ZLS version.
# It is designed to be highly compatible with the specific Zig version you installed.
zls versionCheck asdf readme for more instructions on how to install & manage versions.
Zig downloads use the community mirror list when available. The list is stored in
lib/commands/community-mirrors.txt and is automatically downloaded when missing
or older than 30 days. If all mirrors fail, the download falls back to the official
Zig URL.
You can inspect or manually update the mirror list with:
# Show the current mirror list
asdf cmd zig mirror
# Download the latest mirror list
asdf cmd zig mirror-updateConfigure the mirror list refresh interval with ASDF_ZIG_MIRROR_MAX_AGE (in
days; default: 30):
ASDF_ZIG_MIRROR_MAX_AGE=7 asdf install zig latest