cargo-zigbuild
« Back to VersTracker
Description:
Compile Cargo project with zig as linker
Type: Formula  |  Latest Version: 0.20.1@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: rust zig cross-compilation build-tools linker developer-tools
Install: brew install cargo-zigbuild
About:
cargo-zigbuild is a Cargo subcommand that enables compiling Rust projects for Linux targets using Zig as the linker. It simplifies cross-compilation by automatically providing the necessary C toolchain and libraries, eliminating complex environment setups. This tool is particularly valuable for creating portable binaries that run across various Linux distributions without compatibility issues.
Key Features:
  • Uses Zig as a linker for seamless cross-compilation
  • Automatically handles C runtime linking for glibc and musl targets
  • Supports building for multiple Linux architectures from a single environment
  • Integrates directly with standard Cargo workflows as a subcommand
Use Cases:
  • Cross-compiling Rust applications for different Linux distributions or architectures
  • Building portable binaries with minimal dependencies on the host system
  • Simplifying CI/CD pipelines for multi-platform Rust projects
Alternatives:
  • cross – Uses Docker containers for cross-compilation, which can be heavier than zigbuild's Zig-based approach
  • cargo-xbuild – Focuses on custom target specifications but requires manual toolchain setup
License: MIT
Dependencies: zig
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, arm64_ventura, sonoma, ventura, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Sep 15, 2025 11:44am 0 VERSION_BUMP b8db776d
Dec 16, 2024 1:52pm 0 VERSION_BUMP 11e02a00
Oct 28, 2024 12:29pm 0 VERSION_BUMP cd72c161
Sep 18, 2024 4:55pm 0 VERSION_BUMP 15e17808
Sep 18, 2024 3:26pm 0 VERSION_BUMP e21fd5a5