Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marler8997/zigup
Download and manage zig compilers.
https://github.com/marler8997/zigup
zig zig-compilers
Last synced: 1 day ago
JSON representation
Download and manage zig compilers.
- Host: GitHub
- URL: https://github.com/marler8997/zigup
- Owner: marler8997
- License: mit-0
- Created: 2020-05-30T17:33:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-01-02T19:45:27.000Z (9 days ago)
- Last Synced: 2025-01-03T11:04:26.079Z (8 days ago)
- Topics: zig, zig-compilers
- Language: Zig
- Homepage:
- Size: 125 KB
- Stars: 824
- Watchers: 9
- Forks: 63
- Open Issues: 46
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zig - marler8997/zigup
- awesome-zig - zigup🗒️Download and manage zig compilers
- awesome-version-managers - zigup - A Zig version manager made entirely with Zig. (Version Managers / Zig)
README
# 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](https://github.com/marler8997/zigup/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
zigup master
zigup 0.6.0# fetch a compiler only (do not set it as default)
zigup fetch
zigup fetch master# print the default compiler version
zigup default# set the default compiler
zigup default# 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 []# mark a compiler to keep
zigup keep# run a specific version of the compiler
zigup run ...
```# 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.
# BuildingRun `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).