iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
😊

Managing multiple Zig versions with zigup

に公開

I decided to adopt zigup in order to use both the latest Zig release, 0.11.0, and the master version. Note that you need to have Zig installed beforehand to build zigup.

Obtain the source code from GitHub and build it.

git clone https://github.com/marler8997/zigup.git
cd zigup
zig build

Verify that the zigup executable has been generated in zigup/zig-out/bin.

zigup/zig-out/bin/zigup

Zig files installed by zigup are placed in $HOME/zig, so I decided to copy zigup to this directory and add it to my $PATH.

mkdir $HOME/zig/bin
cp zig-out/bin/zigup $HONE/zig/bin
.bashrc
export PATH=$HOME/zig/bin:$PATH

Apply the settings immediately.

source .bashrc

Install the versions you want to use with zigup.

zigup 0.11.0
zigup master

Check the default version.

zigup default

Also check all installed versions.

zigup list

Discussion