Skip to content

jrachele/zig-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zig-sync

Download and manage Zig compilers and ZLS versions.

A fork of Zigup with built-in support for Mach releases and ZLS, which itself was forked from Zigdown

Building

zig-sync-down is currently built/tested using zig master (0.14.0-dev).

git clone https://github.com/jrachele/zig-sync
cd zig-sync

# Build in release mode
zig build -Doptimize=ReleaseSafe

Usage

<version> may be any version number, stable, master, <version>-mach, mach-latest, latest-installed, or stable-installed

# fetch a compiler + zls version and set it as the default
zig-sync <version>
zig-sync 0.13.0
zig-sync 0.4.0-mach
zig-sync master
zig-sync mach-latest

# fetch a compiler + zls version (does not set it as default)
zig-sync fetch <version>
zig-sync fetch master

# print the default compiler version
zig-sync default

# set the default compiler
zig-sync default <version>
zig-sync default latest-installed
zig-sync default stable-installed

# list the installed compiler versions
zig-sync list

# Removes this compiler
zig-sync clean <version>

# Removes all compilers except latest-installed, latest installed stable, and any kept compilers
zig-sync clean outdated

# mark a compiler to keep
zig-sync keep <version>

# run a specific version of the compiler
zig-sync run <version> <args>...

How the compilers are managed

zig-sync stores each compiler and language server in a subdirectory of the installation directory, by default the data directory from known-folders.

zig-sync can optionally symlink a "default" Zig/ZLS. On windows this will create an executable that forwards invocations to one of the zig/zls executables in the install directory.

Options can be configured via the following command line options:

# Single-run
zig-sync <command> --install-dir <DIR>
zig-sync <command> --zig-symlink <FILE_PATH>
zig-sync <command> --zls-symlink <FILE_PATH>

# Persist settings (saves in the default configuration directory from known-folders)
zig-sync set-install-dir <DIR>
zig-sync set-zig-symlink <FILE_PATH>
zig-sync set-zls-symlink <FILE_PATH>

License

Copyright (c) zig-sync contributers

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

About

Manage Zig and ZLS versions

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 17

Languages