No Description

Jonathan Marler 3d13df6c4e fix overly long line 4 weeks ago
.github 93580c1d4f add windows-aarch64 to ci build 4 months ago
.gitattributes d3cc334855 fix eol to be lf 3 years ago
.gitignore 322d7ec697 fixed compilation with zig 13.0 7 months ago
LICENSE d3eadf245c add MIT-0 License 2 years ago
README.md 8b5be24409 link to new install page in README.md 8 months ago
build.zig 93580c1d4f add windows-aarch64 to ci build 4 months ago
build.zig.zon 5047aff6c0 use std.zip and remove our copy 7 months ago
fixdeletetree.zig 962c153c8b zig fmt 1 year ago
test.zig 3885585b0a update version for test 1 month ago
unzip.zig a0b76496f4 zig fmt 1 month ago
win32exelink.zig d8a374135d update win32exelink for deprecated std alias 3 months ago
zigup.zig 3d13df6c4e fix overly long line 4 weeks ago
zip.zig a0b76496f4 zig fmt 1 month ago

README.md

zigup

Download and manage zig compilers.

How to Install

Go to https://marler8997.github.io/zigup and select your OS/Arch to get a download link and/or instructions to install via the command-line.

Otherwise, you can manually find and download/extract the applicable archive from Releases. It will contain a single static binary named zigup, unless you're on Windows in which case it's 2 files, zigup.exe and zigup.pdb.

Usage

# fetch a compiler and set it as the default
zigup <version>
zigup master
zigup 0.6.0

# fetch a compiler only (do not set it as default)
zigup fetch <version>
zigup fetch master

# print the default compiler version
zigup default

# set the default compiler
zigup default <version>

# list the installed compiler versions
zigup list

# clean compilers that are not the default, not master, and not marked to keep. when a version is specified, it will clean that version
zigup clean [<version>]

# mark a compiler to keep
zigup keep <version>

# run a specific version of the compiler
zigup run <version> <args>...

How the compilers are managed

zigup stores each compiler in a global "install directory" in a versioned subdirectory. On posix systems the "install directory" is $HOME/zig and on windows the install directory will be a directory named "zig" in the same directory as the "zigup.exe".

zigup makes the zig program available by creating an entry in a directory that occurs in the PATH environment variable. On posix systems this entry is a symlink to one of the zig executables in the install directory. On windows this is an executable that forwards invocations to one of the zig executables in the install directory.

Both the "install directory" and "path link" are configurable through command-line options --install-dir and --path-link respectively.

Building

Run zig build to build, zig build test to test and install with:

# install to a bin directory with
cp zig-out/bin/zigup BIN_PATH

Building Zigup

Zigup is currently built/tested using zig 0.12.0.

TODO

  • set/remove compiler in current environment without overriding the system-wide version.

Dependencies

On linux and macos, zigup depends on tar to extract the compiler archive files (this may change in the future).