macOS
brew install cargo-clocal Homebrew formula metadata
sudo port install cargo-cMacPorts ports tree · devel/cargo-c/Portfile · source: api.github.com
brew
Helper program to build and install c-like libraries. Version 0.10.23 via Homebrew; verified 2026-06-22.
install
brew install cargo-clocal Homebrew formula metadata
sudo port install cargo-cMacPorts ports tree · devel/cargo-c/Portfile · source: api.github.com
sudo apk add cargo-cAlpine Linux edge package indexes · cargo-c · source: dl-cdn.alpinelinux.org
sudo apt install cargo-cDebian stable package indexes · cargo-c · source: deb.debian.org
sudo dnf install cargo-cFedora Rawhide package metadata · cargo-c · source: dl.fedoraproject.org
nix profile install nixpkgs#cargo-cnixpkgs package indexes · pkgs/by-name/ca/cargo-c/package.nix · source: api.github.com
sudo pacman -S cargo-cArch Linux sync databases · cargo-c · source: geo.mirror.pkgbuild.com
sudo zypper install cargo-copenSUSE Tumbleweed package metadata · cargo-c · source: download.opensuse.org
overview
Helper program to build and install c-like libraries
history
cargo-c is a Cargo applet for building, testing, installing, and packaging Rust crates as C ABI-compatible libraries with headers, pkg-config files, static libraries, and dynamic libraries.
The lu-zero/cargo-c repository was created in May 2019 and cargo-c 0.1.0 was published to crates.io in June 2019 with cargo-cbuild and cargo-cinstall binaries. The project grew into a four-command suite: cargo-capi, cargo-cbuild, cargo-cinstall, and cargo-ctest.
The README describes cargo-c as a bridge between Cargo and traditional C library distribution. It uses Cargo.toml metadata under `package.metadata.capi` to configure headers, pkg-config files, generated or copied assets, library names, versioning, install paths, and target-specific behavior.
cargo-c integrates with cbindgen for header generation and pkg-config for consumer metadata. Its versioning scheme also tracks the embedded Cargo version in current releases, tying the tool's behavior to the Cargo implementation it vendors or embeds.
cargo-c is one of the more significant Rust packaging tools because it lets Rust libraries participate in long-established C and Unix packaging workflows. The README lists users including ebur128, gcode-rs, gst-plugins-rs, lewton, libdovi, libimagequant, librsvg, rav1e, rustls-ffi, sled, pathfinder, and udbserver.
Distribution adoption is broad for a Cargo plugin: the input records Alpine, Homebrew, Debian, Fedora, MacPorts, Nix, Arch, Ubuntu, and openSUSE packaging. Crates.io reports more than 960,000 downloads and over 90 published versions, reflecting an actively maintained compatibility layer rather than a one-shot helper.
Users install cargo-c from crates.io with `cargo install cargo-c`. `cargo cbuild` builds a library and produces a C header and pkg-config file, `cargo ctest` builds and runs tests, and `cargo cinstall` installs the generated library, header, and metadata into a destination prefix.
A typical project adds a C API module, a `capi` feature, and optional `package.metadata.capi` settings in Cargo.toml. cargo-c then produces artifacts that C and C-compatible build systems can consume through headers, shared or static libraries, and pkg-config.
cargo-c matters because it solves a packaging boundary that Rust itself deliberately does not hide: Rust crates are not automatically C libraries. By generating the Unix packaging pieces expected by downstream consumers, it lets Rust code enter ecosystems built around C headers, SONAMEs, pkg-config, and distro install prefixes.
For package maintainers, cargo-c is a practical adapter between language-package metadata and system-package policy. It is especially visible in multimedia and systems libraries where Rust implementations need to be consumed by C applications or by build systems such as Meson.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
Cargo.tomlexecutables
| Command | Kind | Exposure | Note |
|---|---|---|---|
cargo-capi | cli | global executable | |
cargo-cbuild | cli | global executable | |
cargo-cinstall | cli | global executable | |
cargo-ctest | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/lu-zero/cargo-c
install metadata
| Package key | brew:cargo-c |
|---|---|
| Version | 0.10.23 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/cargo-c |
| Homepage | https://github.com/lu-zero/cargo-c |
| Repository | https://github.com/lu-zero/cargo-c |
| Upstream docs | https://github.com/lu-zero/cargo-c#readme |
| License | MIT |
| Source archive | https://github.com/lu-zero/cargo-c/archive/refs/tags/v0.10.23.tar.gz |
| Last updated | 2026-06-22T14:02:57-07:00 |
| Pulse | updated |
| Dependencies | libgit2, libssh2, openssl@3 |
| Build dependencies | pkgconf, rust |
| Uses from macOS | curl |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | cargo-c |
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
cargo-c 0.10.11-1+b2
Helper program to build and install c-like libraries
https://github.com/lu-zero/cargo-c
sudo apt install cargo-ccargo-c
nix profile install nixpkgs#cargo-ccargo-c 0.9.19-2build3
Helper program to build and install c-like libraries
sudo apt install cargo-ccargo-c 0.10.23-r0
cargo subcommand to build and install C-ABI compatibile dynamic and static libraries
https://github.com/lu-zero/cargo-c
sudo apk add cargo-ccargo-c-doc 0.10.23-r0
cargo subcommand to build and install C-ABI compatibile dynamic and static libraries (documentation)
https://github.com/lu-zero/cargo-c
sudo apk add cargo-c-doccargo-c 0.10.21-1.fc45
Helper program to build and install c-like libraries
https://crates.io/crates/cargo-c
sudo dnf install cargo-ccargo-c 0.10.23-1
A cargo subcommand to build and install C-ABI compatible dynamic and static libraries
https://github.com/lu-zero/cargo-c/
sudo pacman -S cargo-ccargo-c 0.10.15-2.2
Helper to build and install c-like libraries from Rust
https://crates.io/crates/cargo-c
sudo zypper install cargo-ccargo-c
sudo port install cargo-csource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.