cargo-c
« Back to VersTracker
Description:
Helper program to build and install c-like libraries
Type: Formula  |  Latest Version: 0.10.19@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: rust ffi c-library build-tools pkg-config
Install: brew install cargo-c
About:
cargo-c is a Cargo subcommand that assists in building and installing C-compatible libraries from Rust crates. It generates the necessary C headers and pkg-config files, and produces shared or static libraries that can be linked from non-Rust code. This tool streamlines the process of distributing Rust libraries as system-installable C APIs.
Key Features:
  • Generates C headers and pkg-config files automatically
  • Builds and packages cdylib crates as system libraries
  • Provides install and uninstall commands for system-wide deployment
  • Integrates with Cargo for a familiar workflow
Use Cases:
  • Publishing Rust libraries as C APIs for use in other languages
  • Building system-installable shared libraries for Linux/macOS
  • Creating FFI-compatible development packages for downstream developers
Alternatives:
  • cbindgen – Generates C headers from Rust code but does not handle building or installing libraries.
  • cxx – Enables C++/Rust interop with a focus on safe FFI, but is not a general-purpose C library packager.
License: MIT
Dependencies: libgit2, libssh2, openssl@3
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, sonoma, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Nov 2, 2025 12:00pm 0 VERSION_BUMP 85247968
Sep 12, 2025 5:56am 0 VERSION_BUMP 1b4336bc
Jan 11, 2025 10:48pm 0 VERSION_BUMP dfef7a0a
Jan 11, 2025 2:02pm 0 VERSION_BUMP a44d750e
Nov 17, 2024 8:34pm 0 VERSION_BUMP a3374a46