mirror of
https://github.com/ziglang/zig.git
synced 2024-11-21 11:32:24 +00:00
Page:
Install Zig from a Package Manager
Pages
Building Zig From Source
Building Zig on Windows
Community Projects
Community
Contributing
Development with nix
FAQ
Glossary
Home
How to build LLVM, libclang, and liblld from source
How to read the standard library source code
Install Zig from a Package Manager
LLVM Upgrade Process
Language Proposals
Self Hosted Compiler Upgrade Guide
Setting up a new x86_64 Linux CI server
Setting up an ARM64 Windows Dev Kit to be a CI Runner
Third Party Tracking Issues (what is important to other people?)
Troubleshooting Build Issues
Updating libc
Using Cast Result Type Inference
Why Zig When There is Already CPP, D, and Rust?
_Build
zig cc compatibility with clang
54
Install Zig from a Package Manager
Kelvin edited this page 2024-10-13 06:10:12 +03:00
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.
Alpine Linux
apk add zig
Opensuse Tumbleweed
zypper install zig
Arch Linux
pacman -S zig
DragonFlyBSD (ravenports)
ravensw install zig-single-standard
Fedora
dnf install zig
Fedora Silverblue
rpm-ostree install zig
FreeBSD
pkg install lang/zig
Gentoo
# Building from sources
emerge -av dev-lang/zig
# Official ziglang.org static build
emerge -av dev-lang/zig-bin
Homebrew
brew install zig
MacPorts
port install zig
Manjaro
pamac install zig
Mise
mise install zig
NixOS
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.
Ubuntu (snap)
snap install zig --classic --beta
Void Linux
xbps-install -Su zig
Windows (winget)
winget install zig.zig
Windows (choco)
choco install zig
Windows (scoop)
scoop install zig
Termux
pkg i zig