# Install cargo-zigbuild with Homebrew

Compile Cargo project with zig as linker. Version 0.23.0 via Homebrew; verified 2026-06-18.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

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

  Evidence: provider-native install command

## Package facts

- **Package key:** brew:cargo-zigbuild
- **Package manager:** Homebrew
- **Version:** 0.23.0
- **Source summary:** Compile Cargo project with zig as linker
- **Homepage:** <https://github.com/rust-cross/cargo-zigbuild>
- **Repository:** <https://github.com/rust-cross/cargo-zigbuild>
- **Last updated:** 2026-06-18T10:45:13Z
- **Generated:** 2026-08-03T00:40:33+00:00

## Executables

- cargo-zigbuild (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 0.23.0
## Project history and usage

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

### Project history

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

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 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.

### Sources

- <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>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals


## Combined YAML source

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


## Sources

- Nucleus package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
