# Install cbindgen with Homebrew, apk, apt, dnf, MacPorts, pacman

Project for generating C bindings from Rust code. Version 0.29.4 via Homebrew; verified 2026-06-11.

## Install

```sh
sudo av install brew:cbindgen
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cbindgen
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install cbindgen
```

  Evidence: MacPorts ports tree: devel/cbindgen/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add cbindgen
```

  Evidence: Alpine Linux edge package indexes: cbindgen from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install cbindgen
```

  Evidence: Debian stable package indexes: cbindgen from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install cbindgen
```

  Evidence: Fedora Rawhide package metadata: cbindgen from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- pacman (92%):

```sh
sudo pacman -S cbindgen
```

  Evidence: Arch Linux sync databases: cbindgen from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## Package facts

- **Package key:** brew:cbindgen
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/cbindgen>
- **Version:** 0.29.4
- **Source summary:** Project for generating C bindings from Rust code
- **Homepage:** <https://github.com/mozilla/cbindgen>
- **Repository:** <https://github.com/mozilla/cbindgen>
- **Upstream docs:** <https://docs.rs/cbindgen>
- **License:** MPL-2.0
- **Source archive:** <https://github.com/mozilla/cbindgen/archive/refs/tags/v0.29.4.tar.gz>
- **Last updated:** 2026-06-11T00:06:46Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- cbindgen (cli)
- cbindgen (alias)

## Build dependencies

- rust

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.29.4
- Package-manager updated: 2026-06-11
- Local data: ok
- Upstream repository: https://github.com/mozilla/cbindgen
- Upstream latest detected: v0.29.4 (current)
## Project history and usage

cbindgen is a Mozilla-hosted Rust developer tool that generates C, C++11, and Cython headers for Rust crates exposing a public C API.

### Project history

The public Mozilla repository was created in 2017. The official user guide says cbindgen developed largely ad hoc as maintainers added features for their own use cases, with attention to matching Rust's actual layout and ABI guarantees.

### Adoption history

The README lists production users and examples including WebRender, Stylo, maturin, tquic, and metatensor. The supplied package facts show broad packaging across Homebrew, Debian, Ubuntu, Fedora, Arch, Alpine, and MacPorts.

### How it is used

cbindgen can be run as a standalone CLI or called from a Rust `build.rs`. The quick start requires a Rust crate with a public C API and a `cbindgen.toml` configuration, then emits headers with commands such as `cbindgen --config cbindgen.toml --crate my_rust_library --output my_header.h`.

### Why package nerds care

cbindgen sits at a practical packaging boundary: it lets Rust libraries ship C-family headers generated from the Rust source of truth. That makes it important for distributions carrying mixed Rust/C/C++ stacks, especially projects that expose stable FFI surfaces.

### Timeline

- 2017: Public GitHub repository created under Mozilla.
- 2025: 0.28.0 and 0.29.0 releases published on GitHub.
- 2026: 0.29.4 release published on GitHub.

### Related projects

- The README points to production or ecosystem users including WebRender, Stylo, maturin, tquic, and metatensor, and the API documentation is published on docs.rs.

### Sources

- <https://api.github.com/repos/mozilla/cbindgen>
- <https://github.com/mozilla/cbindgen>
- <https://docs.rs/cbindgen>
- <https://github.com/mozilla/cbindgen/blob/main/docs.md>
- <https://github.com/mozilla/cbindgen#readme>
- <https://formulae.brew.sh/api/formula/cbindgen.json>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals


## Configuration and credential file locations

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.


## Configuration files

- Unix: cbindgen.toml
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** cbindgen
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - cbindgen - 0.27.0-1+b4: normalized package name match | Debian stable package indexes: cbindgen from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Generates C bindings from Rust code
- Ubuntu apt - cbindgen - 0.26.0-3: normalized package name match | Ubuntu 24.04 LTS package indexes: cbindgen from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Generates C bindings from Rust code
- apk - cbindgen - 0.29.1-r0: normalized package name match | Alpine Linux edge package indexes: cbindgen from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Tool to generate C bindings from Rust code | https://github.com/mozilla/cbindgen
- dnf - cbindgen - 0.29.3-1.fc45: normalized package name match | Fedora Rawhide package metadata: cbindgen from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Tool for generating C bindings to Rust code | https://crates.io/crates/cbindgen
- pacman - cbindgen - 0.29.4-1: normalized package name match | Arch Linux sync databases: cbindgen from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A tool for generating C bindings to Rust code | https://github.com/mozilla/cbindgen
- MacPorts - cbindgen: normalized package name match | MacPorts ports tree: devel/cbindgen/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [rust](https://www.automicvault.com/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [swig](https://www.automicvault.com/pkg/brew/swig/) - Shares av.db curated category or tags: bindings, c, cli, code-generation, developer-tools.
- [cargo-c](https://www.automicvault.com/pkg/brew/cargo-c/) - Shares av.db curated category or tags: cli, developer-tools, ffi, rust.
- [wasm-bindgen](https://www.automicvault.com/pkg/brew/wasm-bindgen/) - Shares av.db curated category or tags: bindings, cli, developer-tools, rust.
- [bindgen](https://www.automicvault.com/pkg/brew/bindgen/) - Shares av.db curated category or tags: bindings, cli, developer-tools, ffi, rust.
- [cargo-auditable](https://www.automicvault.com/pkg/brew/cargo-auditable/) - Shares av.db curated category or tags: cli, developer-tools, rust.
- [cargo-binstall](https://www.automicvault.com/pkg/brew/cargo-binstall/) - Shares av.db curated category or tags: cli, developer-tools, rust.
- [cargo-binutils](https://www.automicvault.com/pkg/brew/cargo-binutils/) - Shares av.db curated category or tags: cli, developer-tools, rust.
- [cargo-bloat](https://www.automicvault.com/pkg/brew/cargo-bloat/) - Shares av.db curated category or tags: cli, developer-tools, rust.
- [typeshare](https://www.automicvault.com/pkg/brew/typeshare/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, code, code-generation, developer, developer-tools.
- [cargo-generate](https://www.automicvault.com/pkg/brew/cargo-generate/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, code, code-generation, developer, developer-tools.
- [cbindgen](https://www.automicvault.com/pkg/cargo/cbindgen/) - Same normalized package name exists in another local package ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/cbindgen.yml](https://github.com/automic-vault/db/blob/main/combined/cbindgen.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
