# cargo-zigbuild を Homebrew, apk, Nix, pacman でインストール

cargo-zigbuild のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:cargo-zigbuild
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install cargo-zigbuild
```

  証拠: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add cargo-zigbuild
```

  証拠: Alpine Linux edge package indexes: cargo-zigbuild from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#cargo-zigbuild
```

  証拠: nixpkgs package indexes: pkgs/by-name/ca/cargo-zigbuild/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S cargo-zigbuild
```

  証拠: Arch Linux sync databases: cargo-zigbuild from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## パッケージ情報

- **パッケージキー:** brew:cargo-zigbuild
- **パッケージマネージャ:** Homebrew
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/cargo-zigbuild>
- **バージョン:** 0.23.0
- **ソース概要:** Compile Cargo project with zig as linker
- **ホームページ:** <https://github.com/rust-cross/cargo-zigbuild>
- **リポジトリ:** <https://github.com/rust-cross/cargo-zigbuild>
- **ライセンス:** MIT
- **ソースアーカイブ:** <https://github.com/rust-cross/cargo-zigbuild/archive/refs/tags/v0.23.0.tar.gz>
- **最終更新:** 2026-06-18T10:45:13Z
- **生成日時:** 2026-08-04T22:13:35+00:00

## 実行可能ファイル

- cargo-zigbuild (cli)
- cargo-zigbuild (エイリアス)

## 依存関係

- zig

## ビルド依存関係

- rust

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## バージョンと鮮度

- ページ生成日: 2026-08-04
- マネージャ版: 0.23.0
- マネージャ更新日: 2026-06-18
- ローカルデータ: OK
- 上流リポジトリ: https://github.com/rust-cross/cargo-zigbuild
- 検出された最新: v0.23.0 (最新)
## プロジェクトの歴史と使われ方

cargo-zigbuild is a Cargo subcommand that compiles Rust projects using Zig as the linker to simplify cross compilation.

### プロジェクトの歴史

The official README describes cargo-zigbuild as using Zig as linker for easier Rust cross compilation, with cargo, pip, and container installation paths.

### 採用の歴史

GitHub records the repository as created in February 2022, and crates.io records the first release the same day. The input package facts list Alpine, Homebrew, Nix, and Arch packages, and the README also advertises PyPI and Docker distribution.

### 使われ方

The README documents installing Zig, adding Rust targets with rustup, running `cargo zigbuild --target ...`, setting environment variables for Zig/Python/cache paths, targeting glibc versions, and building macOS universal2 binaries.

### パッケージ好きにとっての重要性

cargo-zigbuild is significant for package builders because it packages a practical Rust cross-compilation workflow around Zig's linker and libc tooling, reducing the need for bespoke target toolchains.

### タイムライン

- 2022: GitHub repository created and first crates.io release recorded.
- 2026: crates.io records max_version 0.23.0.

### Related projects

- The README links Zig, ziglang's PyPI package, Docker images, rustup targets, bindgen, and upstream Zig cross-compilation issues.

### ソース

- <https://api.github.com/repos/rust-cross/cargo-zigbuild>
- <https://github.com/rust-cross/cargo-zigbuild>
- <https://docs.rs/cargo-zigbuild>
- <https://github.com/rust-cross/cargo-zigbuild#readme>
- <https://crates.io/api/v1/crates/cargo-zigbuild>
- <https://formulae.brew.sh/api/formula/cargo-zigbuild.json>


## セキュリティノート

narrow executable package without higher-risk signals.

- **Geiger リスク:** グリーン / 低
- narrow executable package without higher-risk signals

## ソースデータベース詳細

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** cargo-zigbuild
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 他のパッケージマネージャ記録

- Nix - cargo-zigbuild: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/cargo-zigbuild/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - cargo-zigbuild - 0.22.3-r0: normalized package name match | Alpine Linux edge package indexes: cargo-zigbuild from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Compile Cargo project with zig as linker | https://github.com/rust-cross/cargo-zigbuild
- apk - cargo-zigbuild-doc - 0.22.3-r0: normalized package name match | Alpine Linux edge package indexes: cargo-zigbuild-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Compile Cargo project with zig as linker (documentation) | https://github.com/rust-cross/cargo-zigbuild
- pacman - cargo-zigbuild - 0.23.0-1: normalized package name match | Arch Linux sync databases: cargo-zigbuild from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Compile Cargo project with zig as linker | https://github.com/rust-cross/cargo-zigbuild


## 関連リンク

- [Source-control packages](https://pkg.so/ja/source-control-tools/) - Belongs to a source-control command family.
- [Package publisher tools](https://pkg.so/ja/package-publishers/) - Belongs to a package publishing or registry command family.
- [Terminal utility packages](https://pkg.so/ja/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/ja/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [zig](https://pkg.so/ja/brew/zig/) - Runtime dependency declared by Homebrew.
- [rust](https://pkg.so/ja/brew/rust/) - Build dependency declared by Homebrew.
- [cargo-binstall](https://pkg.so/ja/brew/cargo-binstall/) - Shares pkgdb curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-c](https://pkg.so/ja/brew/cargo-c/) - Shares pkgdb curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-nextest](https://pkg.so/ja/brew/cargo-nextest/) - Shares pkgdb curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-edit](https://pkg.so/ja/brew/cargo-edit/) - Shares pkgdb curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-update](https://pkg.so/ja/brew/cargo-update/) - Shares pkgdb curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-llvm-cov](https://pkg.so/ja/brew/cargo-llvm-cov/) - Shares pkgdb curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-udeps](https://pkg.so/ja/brew/cargo-udeps/) - Shares pkgdb curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-outdated](https://pkg.so/ja/brew/cargo-outdated/) - Shares pkgdb curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-generate](https://pkg.so/ja/brew/cargo-generate/) - Both packages touch the same language runtime or ecosystem. Shared terms: as, cargo, cli, developer, developer-tools.
- [cargo-zigbuild](https://pkg.so/ja/cargo/cargo-zigbuild/) - Same normalized package name exists in another local package ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/cargo-zigbuild.yml](https://github.com/mxcl/pkgdb/blob/main/combined/cargo-zigbuild.yml)


## ソース

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