macOS
brew install cargo-clocal Homebrew formula metadata
sudo port install cargo-cMacPorts ports tree · devel/cargo-c/Portfile · 来源: api.github.com
安装
brew install cargo-clocal Homebrew formula metadata
sudo port install cargo-cMacPorts ports tree · devel/cargo-c/Portfile · 来源: api.github.com
sudo apk add cargo-cAlpine Linux edge package indexes · cargo-c · 来源: dl-cdn.alpinelinux.org
sudo apt install cargo-cDebian stable package indexes · cargo-c · 来源: deb.debian.org
sudo dnf install cargo-cFedora Rawhide package metadata · cargo-c · 来源: dl.fedoraproject.org
nix profile install nixpkgs#cargo-cnixpkgs package indexes · pkgs/by-name/ca/cargo-c/package.nix · 来源: api.github.com
sudo pacman -S cargo-cArch Linux sync databases · cargo-c · 来源: geo.mirror.pkgbuild.com
sudo zypper install cargo-copenSUSE Tumbleweed package metadata · cargo-c · 来源: download.opensuse.org
概览
Helper program to build and install c-like libraries
历史
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.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
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.toml可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
cargo-capi | cli | 全局可执行文件 | |
cargo-cbuild | cli | 全局可执行文件 | |
cargo-cinstall | cli | 全局可执行文件 | |
cargo-ctest | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/lu-zero/cargo-c
安装元数据
| 软件包键 | brew:cargo-c |
|---|---|
| 版本 | 0.10.23 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/cargo-c |
| 主页 | https://github.com/lu-zero/cargo-c |
| 仓库 | https://github.com/lu-zero/cargo-c |
| 上游文档 | https://github.com/lu-zero/cargo-c#readme |
| 许可证 | MIT |
| 源码归档 | https://github.com/lu-zero/cargo-c/archive/refs/tags/v0.10.23.tar.gz |
| 最后更新 | 2026-06-22T14:02:57-07:00 |
| Pulse | updated |
| 依赖 | libgit2, libssh2, openssl@3 |
| 构建依赖 | pkgconf, rust |
| macOS 提供的库 | curl |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| 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 |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
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-c来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.