# rust-cross/cargo-zigbuild

Compile Cargo project with zig as linker

Repository: https://github.com/rust-cross/cargo-zigbuild
Canonical: https://ross.abutalabs.com/products/cargo-zigbuild
Language: Rust
License: MIT
License Family: permissive
Topics: cargo-subcommand, zig, cross-compile
Last push: 2026-08-26T15:02:15+00:00

## Health v2 (maintenance only)
Score: 99/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 99, longevity 100
- inputs: {"age_days": 1659, "days_push": 7, "days_rel": 9, "gap_med": 9, "n_releases_24m": 24}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2632, forks 98 (observed 2026-08-28T04:07:06.142993+00:00)

## What it is
cargo-zigbuild is a Cargo subcommand that uses zig as the linker to make cross-compiling Rust projects easier. It supports building for many targets including macOS, Linux, and Windows from any host platform.

## Use cases
- cross-compile a Rust binary for aarch64 Linux from x86_64
- build macOS binaries from a Linux CI machine
- avoid installing platform-specific C cross toolchains
- build Python extension modules for multiple platforms
- simplify Rust cross-compilation in Docker CI pipelines

## When to choose
- you need to cross-compile Rust projects with C dependencies without manual toolchain setup
- you want to build for macOS from Linux or Windows
- you want a drop-in cargo build replacement for cross targets

## When to avoid
- you only build for the host platform
- your project requires target-specific toolchains zig cannot provide
- you need MSVC-compatible Windows builds

## Facets
- artifact type: cli-tool
- maturity: active
- function: build-tool, compiler, developer-tools, cli
- domain: developer-tools, cross-platform
- platform: windows, rust, cli
- tags: cross-compilation, zig, cargo-subcommand, rust, command-line, linux, macos, docker

## Member repositories
- rust-cross/cargo-zigbuild (main) score 99

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:06.142993+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:19:36.842827+00:00, confidence not recorded.
  - readme: https://github.com/rust-cross/cargo-zigbuild (fetched 2026-08-28T04:07:06.142993+00:00, sha 5e03e6543a99)
  - registry_crates: https://crates.io/api/v1/crates/cargo-zigbuild (fetched 2026-08-29T10:02:25.643861+00:00, sha af06f64cf6bc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
