Zig Version Manager (zvm
) is a simple yet powerful tool to manage multiple versions of the Zig programming language.
- ✨ Features
- 📥 Installation
- 🧠 Auto-completion
- 📝 Differences with other Zig version managers
- 🫂 Contributing
# specific versons can be installed
zvm install 0.10.1
# as well as channels (master, stable)
zvm install master
# channels can be upgraded to the latest version
zvm upgrade master
# switch to a specific version globally (~/.zvm/default)
zvm use 0.10.1 --global
# or for the current directory (./.zvm/)
zvm use 0.10.1
# a local git repository can also be used
zvm config set git_dir_path /path/to/zig/repo
zvm use git
# with the selected version
zvm zig build -Doptimize=ReleaseFast
# or with a specific version
zvm spawn 0.10.1 build -Doptimize=ReleaseFast
brew tap gaetschwartz/zvm
brew install zvm
scoop bucket add zvm https://github.com/gaetschwartz/scoop-zvm
scoop install zvm
Note: Due to an issue with Expand-Archive on Windows it is recommended to install 7zip
and add it to your PATH. Zvm will automatically use it if it is available.
This can be done by running scoop install 7zip
.
Choose your platform and download the latest release here.
Add the binary to your path.
Auto-completion is available for zsh
and powershell
. It is installed automatically when using the Homebrew.
Add this to your $PROFILE to enable auto-completion for powershell.
Invoke-Expression ((zvm completions --shell=powershell) -join "`n")
Zigup is a great tool to install Zig and manage multiple versions of Zig. However, it is pretty much limited to managing the different versions of Zig.
Zvm on the counterpart aims to be a more complete Zig version manager. It allows to run a command with a specific version of Zig, to switch between versions (globally or for the current directory) and to use a local git repository as a Zig version.
Contributions, issues and feature requests are welcome!
git clone --recurse-submodules -j8 https://github.com/gaetschwartz/zvm.git
cd zvm
zig build -Doptimize=ReleaseFast