-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Install Zig from a Package Manager
february cozzocrea edited this page Dec 24, 2023
·
55 revisions
Note: Official builds of master branch and releases are available for download.
When using a package manager, it is best to use a tagged release rather than using an option to install a development version.
See Repology for an overview of which package management systems and operating systems Zig has already been packaged for, and what the current packaged version is.
pacman -S zig
ravensw install zig-single-standard
dnf install zig
rpm-ostree install zig
pkg install lang/zig
# Building from sources
emerge -av dev-lang/zig
# Official ziglang.org static build
emerge -av dev-lang/zig-bin
brew install zig
port install zig
Rather than installing development binaries globally, create a shell.nix
for your project:
# shell.nix
let
pkgs = import <nixpkgs> {};
in
pkgs.mkShell {
packages = [
pkgs.zig
# other deps here
];
}
Then run nix-shell
to enter a development shell with zig available.
snap install zig --classic --beta
xbps-install -Su zig
winget install zig.zig
choco install zig
scoop install zig
pkg i zig