Version manager

Version manager

Zig version manager

Using ZIG before 1.0 might require you to often switch between master and the last official release. Almost approximately every 3 months a new version is released.

One solution would be to install both (or more) versions of ZIG and switch the PATH environment variable to the version you want to use.

But the best solution is to use the ZIG Version Manager (ZVM), which is a tool that allows you to install and switch between different versions of ZIG.

We recommend using ZVM (stands for Zig Version Manager) which is a simple and easy to use tool.

Guide

Installing the tool:

  curl https://raw.githubusercontent.com/tristanisham/zvm/master/install.sh | bash
  echo "# ZVM" >> $HOME/.profile
  echo export ZVM_INSTALL="$HOME/.zvm/self" >> $HOME/.profile
  echo export PATH="$PATH:$HOME/.zvm/bin" >> $HOME/.profile
  echo export PATH="$PATH:$ZVM_INSTALL/" >> $HOME/.profile

Listing all the versions available to download:

  zvm ls --all

Downloading a specific version:

  zvm i master

Display all your downloaded versions:

  zvm ls

Use one of those versions:

  zvm use master

There are other commands available, you can check them by running:

  zvm help

Or checking the ZVM repository.