• Stars
    star
    298
  • Rank 134,693 (Top 3 %)
  • Language
    Zig
  • License
    MIT No Attribution
  • Created almost 4 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Download and manage zig compilers.

zigup

Download and manage zig compilers.

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

TODO

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

Dependencies

zigup depends on https://github.com/marler8997/ziget which in turn depends on other projects depending on which SSL backend is selected. You can provide -Dfetch to zig build to automatically clone all repository dependencies, otherwise, the build will report a missing dependency error with an explanation of how to clone it.

The windows target depends on https://github.com/SuperAuguste/zarc to extract zip files. This repo might point to my fork if there are needed changes pending the acceptance of a PR: https://github.com/marler8997/zarc.

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

More Repositories

1

ziglibc

Zig
118
star
2

ziget

Zig library/tool to request network assets
Zig
69
star
3

reloader

C
44
star
4

zig-unofficial-releases

A list of unofficial zig releases
Zig
43
star
5

SlimeJavascript

Slime Volleyball Engine in Javascript
HTML
35
star
6

zig-build-repos

Enables build.zig files to depend on git repositories.
Zig
32
star
7

har

Human Archive Format
D
18
star
8

zog

Some zig libraries
Zig
11
star
9

html-css-renderer

An HTML/CSS Renderer.
Zig
10
star
10

zigx

Zig
10
star
11

netpunch

Zig
9
star
12

dbus-zig

Zig
7
star
13

zigcc

Wrappers for the Zig compiler to emulator C compiler command-line interfaces
Zig
6
star
14

nix-notes

My notes on Nix
6
star
15

zig-package-manager

Facilitate a collaborative design for Zig's Package Manager
6
star
16

zigbuild

Tools and resources to build/update the zig compiler
Python
5
star
17

CSharpToD

Exploring Roslyn API by writing a C# to D transpiler
C#
4
star
18

staticpkg

Zig
4
star
19

image-viewer

An image-viewer experiment written in Zig
Zig
4
star
20

zig-irc-logs

3
star
21

zigterm

A toy terminal emulator written in Zig
Zig
3
star
22

windows-remote-control

Zig
3
star
23

mored

[DEPRECATED] This repo is being deprecated in favor of https://github.com/dragon-lang/mar
D
3
star
24

zig-wav

Read and write basic WAV files in Zig (mirror)
Zig
3
star
25

fsveil

Run programs with a veiled view of the filesystem
Zig
3
star
26

hacknes

A "hackable" NES emulator
C++
3
star
27

pkgconfig-zig

An implementation of pkgconfig in Zig
Zig
3
star
28

fith

My exploration of the forth language and possible improvements.
C#
3
star
29

ZigVersionCheck

A module to check the zig compiler version in your build.zig files
Zig
3
star
30

zigalloc

an allocation library for zig
Zig
2
star
31

7-Zip

7-Zip with the build system replaced by zig
C++
2
star
32

sycl_badge

Zig
2
star
33

windows-imager

Write an image to a disk on windows
Zig
2
star
34

zigpkg

Explorations for the Zig package manager
Zig
2
star
35

xremoteview

View a remote X session
Zig
2
star
36

maros

D
2
star
37

DotNetStuff

C#
1
star
38

ldwin32

A userspace implementation of execve for Windows
Zig
1
star
39

audio

My Exploration of Audio Software
Zig
1
star
40

stupidjsonparser

Just a stupid JSON parser written in D.
D
1
star
41

zigexplore

1
star
42

meson-example-app

An example to demonstrate a meson library dependency via github
C
1
star
43

zig-toolchain

Tools that enable Zig to build things
Zig
1
star
44

winres

Command Line tool to Query/Modify resources in win32 executables.
Zig
1
star
45

mediastream

Media Streaming Software
Zig
1
star
46

zig-pkg-db

1
star
47

zigwin32-preview

This preview repository has been replaced by the real thing at https://github.com/marlersoft/zigwin32
Zig
1
star
48

crystal

A simple static bootloader
Assembly
1
star
49

WindowsNfs

An NFS library for windows
C++
1
star
50

kan

A semantic focused language
D
1
star
51

dmscorlib

a repo directory to share the generated mscorlib D wrapper for the .NET library from https://github.com/marler8997/clrbridge
D
1
star
52

WindowsSymlinks

Let's figure out what to do about symlinks on Windows
1
star
53

static-python3

Superseded by https://github.com/marler8997/static-binaries
Python
1
star
54

windows-api

Project Abandoned, replaced by https://github.com/microsoft/win32metadata
Python
1
star
55

wsl-register

A program to register distros with WSL (Windows Subsystem for Linux)
D
1
star
56

audio-deinterlacer

Temporary repo to hold a small tool to interlace/deinterlace audio
Zig
1
star
57

More.Nfs

And NFS Library/Client/Server using the C# More library
C#
1
star
58

ncurses_notes

Notes on ncurses
1
star
59

CSharpToDCoreclr

The current state of the coreclr that is converted using https://github.com/marler8997/CSharpToD
D
1
star
60

longfiles

A D module for handling long filenames in windows.
D
1
star
61

dlangfeatures

A list of features that I think would benefit the D Programming Language
D
1
star
62

minish

A mini-shell language interpreter
D
1
star