pkg.soopen package index

brew / 排名 513

使用 Homebrew, apk, chocolatey, dnf, MacPorts, Nix, pacman, zypper, scoop, winget 安装 zig

查看 zig 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install zig

local Homebrew formula metadata

MacPorts已验证 · 94%
sudo port install zig

MacPorts ports tree · lang/zig/Portfile · 来源: api.github.com

Linux

Alpine Linux apk已验证 · 92%
sudo apk add zig

Alpine Linux edge package indexes · zig · 来源: dl-cdn.alpinelinux.org

Fedora dnf已验证 · 92%
sudo dnf install zig

Fedora Rawhide package metadata · zig · 来源: dl.fedoraproject.org

Nix已验证 · 92%
nix profile install nixpkgs#zig

nixpkgs package indexes · zig · 来源: raw.githubusercontent.com

Arch Linux pacman已验证 · 92%
sudo pacman -S zig

Arch Linux sync databases · zig · 来源: geo.mirror.pkgbuild.com

openSUSE zypper已验证 · 92%
sudo zypper install zig

openSUSE Tumbleweed package metadata · zig · 来源: download.opensuse.org

概览

软件包摘要

Programming language designed for robustness, optimality, and clarity

命令和别名

  • zig

历史

项目历史与用法

Zig is a general-purpose systems programming language and toolchain created by Andrew Kelley, aimed at robust, optimal, and reusable software. For package nerds it is unusually important because the packaged artifact is not just a language compiler: the zig executable is also a build runner, cross C/C++ compiler driver, linker front-end, test runner, formatter, documentation generator, and, since 0.11, the home of Zig package management.

项目历史

The public Zig repository dates to August 2015 on GitHub, and the project grew around the idea that a C-like systems language could make compile-time execution, explicit allocation, error handling, cross-compilation, and C interop feel like one coherent toolchain instead of a pile of external build machinery. The Zig home page still presents that philosophy through simple-language constraints such as no hidden control flow, no hidden allocations, and no preprocessor or macros.

A major internal evolution was the self-hosted compiler. Loris Cro described the 0.10-era switch as shipping a new compiler written in Zig, cutting compiler-build memory use from 9.6 GB to 2.8 GB in one example and opening the door to custom backends and the official package manager. Zig 0.11 then removed the old stage1 path from normal use, bootstrapped through a small WebAssembly compiler artifact, and described the compiler as 100% Zig code apart from LLVM libraries.

Zig 0.11 was also the debut of the official package manager. Instead of creating a central package registry, the release notes describe packages as arbitrary directory trees, local directories, or archives fetched from URLs, with metadata in build.zig.zon and integration through the Zig build system. That design kept package management close to zig build and reinforced Zig's identity as a toolchain rather than only a language front end.

In November 2025, the Zig project made its canonical repository Codeberg instead of GitHub. Andrew Kelley's migration post says the GitHub mirror was made read-only and origin/master moved to https://codeberg.org/ziglang/zig.git, a governance and infrastructure milestone for a project funded through the Zig Software Foundation.

采用历史

Zig's adoption has been strongest where a small, reproducible native toolchain matters: cross-compiling C/C++, shipping static command-line programs, language runtimes, databases, terminal tools, game-adjacent systems code, and embedded or freestanding experiments. The language's package-manager story lagged behind the compiler for years, so early ecosystem practice often involved vendoring, git submodules, or third-party tools before build.zig.zon became the official path.

One important adoption path was zig cc rather than Zig-the-language. Motiejus Jakstys' write-up of Uber's usage describes Uber using Zig to compile C/C++ code in its Go monorepo, attracted by configurable glibc versions and macOS cross-compilation. This made Zig visible to package and build-system people even in places where no application code was written in Zig.

The 0.14 and 0.15 release cycles show the project trying to turn interest into daily usability. Zig 0.14 emphasized long-term investments in incremental compilation and the x86 backend, while 0.15 enabled the self-hosted x86_64 backend by default for most Debug-mode x86_64 targets and reported roughly 5x faster Debug compilation than LLVM in most cases.

使用方式

Typical package-manager usage starts with installing the single zig command, then using zig build, zig test, zig fmt, zig cc, zig c++, zig run, and zig fetch-style package workflows depending on project age. Zig projects conventionally use build.zig as executable build logic and, for modern package-manager integration, build.zig.zon for package metadata and dependencies.

Zig is also frequently installed as a hermetic C/C++ toolchain. A package maintainer can reach for zig cc to cross-compile without separately installing target libc headers, linker bits, and SDK fragments, which is why Zig appears in build farms and language-package recipes even when the upstream project is C or C++.

Because Zig has not reached 1.0, package users often pin compiler versions tightly. Formulae such as zig@0.14 and zig@0.15 exist because build-system APIs, standard-library APIs, and language details can change enough that downstream projects need a known compiler generation rather than whatever the latest zig package currently provides.

为什么软件包爱好者会关心

Zig is one of the clearest modern examples of a language package doubling as a distribution primitive. It collapses compiler, build system, package manager, C/C++ cross toolchain, and linker driver into one installable binary, which changes how downstream packages think about bootstrapping and cross-platform builds.

The official package manager is package-nerd interesting precisely because it avoids a central registry. The package is a source tree plus build.zig.zon metadata and a hashable fetched dependency, so the ecosystem's trust, cache, and reproducibility questions look more like Go modules and source archives than npm-style registry publication.

Zig's versioned packages are also a live reminder that pre-1.0 languages are not just semver labels in package managers. Keeping 0.14 and 0.15 installable gives downstream recipes a way to survive build.zig API churn while still letting the main zig formula move.

时间线

  • 2015-08-06: The public ziglang/zig GitHub repository is created; the project later records this era as the original git init period.
  • 2020: The Zig Software Foundation is founded by Andrew Kelley to support development of the language.
  • 2022: The self-hosted compiler ships in the 0.10 era, replacing the old C++ bootstrap compiler for most development work.
  • 2023-08-04: Zig 0.11.0 is released with the debut of official package management and build.zig.zon.
  • 2025-03-05: Zig 0.14.0 is released, emphasizing incremental compilation work, build-system changes, and the self-hosted x86 backend.
  • 2025-08-19: Zig 0.15.1 is released with the self-hosted x86_64 backend enabled by default for most Debug-mode x86_64 targets.
  • 2025-11-26: Zig moves canonical development from GitHub to Codeberg.
  • 2026-04-13: Zig 0.16.0 becomes the latest stable release listed on the Zig download page.

Related projects

  • Zigmod was an independent third-party Zig package manager before and alongside the official build.zig.zon package-manager work.
  • zigup and anyzig are version-management tools used to install or select Zig compilers across projects.
  • LLVM, LLD, and Clang are central to Zig's historical implementation and cross-compilation story, even as Zig works toward making LLVM optional for more paths.
  • bazel-zig-cc packages Zig's C/C++ toolchain behavior for Bazel users, notably in the Uber case study.

安全态势

风险级别:yellow

generalized runtime or code generation signal.

风险分类器

yellow 风险 · 中 置信度 · runtime

原因

  • generalized runtime or code generation signal

信号

  • text:programming language

安装行为

  • 未记录 Homebrew bottle 元数据。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
zig可执行文件已索引可执行文件从本地可执行文件索引发现。

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-08-03
管理器版本0.16.0
管理器更新时间2026-07-11
本地数据未知
上游不可用
检测到的最新版本未检测到
  • OK没有生成新鲜度警告。

安装元数据

软件包元数据

软件包键brew:zig
版本0.16.0
软件包管理器Homebrew
主页https://ziglang.org/
最后更新2026-07-11T09:18:36-04:00
Pulseupdated
Bottle未记录
服务未声明

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Nix95%

zig

nix profile install nixpkgs#zig
  • normalized package name match
  • 匹配方式:Zig
nixpkgs package indexes · raw.githubusercontent.com · nixpkgs package indexes: zig from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
apk95%

zig 0.16.0-r1

General-purpose programming language designed for robustness, optimality, and maintainability

https://ziglang.org/

sudo apk add zig
  • License: MIT
  • Architecture: x86_64
  • Source Package: zig
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Zig
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: zig from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
apk95%

zig-doc 0.16.0-r1

General-purpose programming language designed for robustness, optimality, and maintainability (documentation)

https://ziglang.org/

sudo apk add zig-doc
  • License: MIT
  • Architecture: x86_64
  • Source Package: zig
  • normalized package name match
  • 匹配方式:Zig
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: zig-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
dnf95%

zig 0.16.0-2.fc45

Programming language for maintaining robust, optimal, and reusable software

https://ziglang.org

sudo dnf install zig
  • License: MIT AND NCSA AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later AND GPL-2.0-or-later WITH GCC-exception-2.0 AND
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: zig
  • 8 依赖
  • 2 提供
  • normalized package name match
  • 匹配方式:Zig
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: zig from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst
dnf95%

zig-doc 0.16.0-2.fc45

Documentation for zig

https://ziglang.org

sudo dnf install zig-doc
  • License: MIT AND NCSA AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later AND GPL-2.0-or-later WITH GCC-exception-2.0 AND
  • Category: Unspecified
  • Architecture: noarch
  • Source Package: zig
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Zig
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: zig-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst
dnf95%

zig-libs 0.16.0-2.fc45

zig Standard Library

https://ziglang.org

sudo dnf install zig-libs
  • License: MIT AND NCSA AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later AND GPL-2.0-or-later WITH GCC-exception-2.0 AND
  • Category: Unspecified
  • Architecture: noarch
  • Source Package: zig
  • 1 提供
  • normalized package name match
  • 匹配方式:Zig
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: zig-libs from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst
dnf95%

zig-rpm-macros 0.16.0-2.fc45

Common RPM macros for zig

https://ziglang.org

sudo dnf install zig-rpm-macros
  • License: MIT AND NCSA AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later AND GPL-2.0-or-later WITH GCC-exception-2.0 AND
  • Category: Unspecified
  • Architecture: noarch
  • Source Package: zig
  • 1 依赖
  • 2 提供
  • normalized package name match
  • 匹配方式:Zig
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: zig-rpm-macros from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst
pacman95%

zig 0.16.0-1

a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software

https://ziglang.org/

sudo pacman -S zig
  • License: MIT
  • Architecture: x86_64
  • 3 依赖
  • normalized package name match
  • 匹配方式:Zig
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: zig from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz
zypper95%

zig 0.15.2-1.2

Compiler for the Zig language

https://ziglang.org/

sudo zypper install zig
  • License: MIT
  • Category: Development/Languages/Other
  • Architecture: x86_64
  • Source Package: zig
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Zig
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: zig from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst
zypper95%

zig0.14 0.14.1-2.5

Compiler for the Zig language

https://ziglang.org/

sudo zypper install zig0.14
  • License: MIT
  • Category: Development/Languages/Other
  • Architecture: x86_64
  • Source Package: zig0.14
  • 6 依赖
  • 3 提供
  • normalized package name match
  • 匹配方式:Zig
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: zig0.14 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst
zypper95%

zig0.15 0.15.2-2.5

Compiler for the Zig language

https://ziglang.org/

sudo zypper install zig0.15
  • License: MIT
  • Category: Development/Languages/Other
  • Architecture: x86_64
  • Source Package: zig0.15
  • 6 依赖
  • 3 提供
  • normalized package name match
  • 匹配方式:Zig
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: zig0.15 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst
zypper95%

zig0.16 0.16.0-1.3

Compiler for the Zig language

https://ziglang.org/

sudo zypper install zig0.16
  • License: MIT
  • Category: Development/Languages/Other
  • Architecture: x86_64
  • Source Package: zig0.16
  • 6 依赖
  • 3 提供
  • normalized package name match
  • 匹配方式:Zig
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: zig0.16 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst
MacPorts95%

zig

sudo port install zig
  • normalized package name match
  • 匹配方式:Zig
MacPorts ports tree · api.github.com · MacPorts ports tree: lang/zig/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
Chocolatey95%

zig

choco install zig
  • normalized package name match
  • 匹配方式:Zig
Chocolatey community package catalog · community.chocolatey.org · Chocolatey community package catalog: zig from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','zerotier-one'
Scoop95%

main/zig

scoop install main/zig
  • normalized package name match
  • 匹配方式:Zig
Scoop official bucket manifest trees · api.github.com · Scoop official bucket manifest trees: bucket/zig.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
winget95%

zig.zig

winget install --id zig.zig -e
  • normalized package name match
  • 匹配方式:Zig
Windows Package Manager source index · cdn.winget.microsoft.com · Windows Package Manager source index: zig.zig from https://cdn.winget.microsoft.com/cache/source.msix

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • pkg.so package database
  • pkgdb category and tag curation