Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 1.23 KB

README.md

File metadata and controls

37 lines (29 loc) · 1.23 KB

A Nix Flake for developing Zig.

Features

  • A Nix dev shell for building Zig from src
    # Start dev shell
    nix develop .
  • An opinionated script (./run) that helps with building and testing Zig
    ./run buildBootstrap # Build stage3
    ./run usePrebuilt # Alternatively, use a signature-checked stage3 binary from ziglang.org
    ./run buildDebug # Use stage3 to create a Zig debug build
    ./run testBehavior # Run behavior tests for the debug build
    Getting from zero to a self-built Zig is really fast:
    ./run usePrebuilt && ./run buildDebug takes less than 3 minutes on an average desktop system.
  • Zig master pkgs
    nix build .#zig # Built from source
    nix build .#zigPrebuilt # Prebuilt static binary from ziglang.org

This repo is regularly updated to track Zig master.

Usage

See ./usage.sh on how to use this repo.

Dev

See ./dev/README.md on how to develop and contribute to this repo.

See also

zig-overlay, which packages the official prebuilt static Zig binaries with Nix.
zig2nix, Flake for packaging, building and running Zig projects.