Giter VIP home page Giter VIP logo

zigup's Introduction

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 vesrion.

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).

zigup's People

Contributors

marler8997 avatar g-w1 avatar iddev5 avatar rigobert9 avatar kassane avatar truemedian avatar devins2518 avatar pfgithub avatar xegoist avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.