# Install cargo-public-api with Homebrew, Nix, pacman

List and diff the public API of Rust library crates. Version 0.52.0 via Homebrew; verified 2026-05-25.

## Install

```sh
sudo av install brew:cargo-public-api
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cargo-public-api
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#cargo-public-api
```

  Evidence: nixpkgs package indexes: pkgs/by-name/ca/cargo-public-api/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S cargo-public-api
```

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

## Package facts

- **Package key:** brew:cargo-public-api
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/cargo-public-api>
- **Version:** 0.52.0
- **Source summary:** List and diff the public API of Rust library crates
- **Homepage:** <https://github.com/cargo-public-api/cargo-public-api>
- **Repository:** <https://github.com/cargo-public-api/cargo-public-api>
- **Upstream docs:** <https://github.com/cargo-public-api/cargo-public-api#readme>
- **License:** MIT
- **Source archive:** <https://github.com/cargo-public-api/cargo-public-api/archive/refs/tags/v0.52.0.tar.gz>
- **Last updated:** 2026-05-25T22:02:40Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- cargo-public-api (cli)
- cargo-public-api (alias)

## Build dependencies

- pkgconf
- rust

## Uses from macOS

- curl

## 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.52.0
- Package-manager updated: 2026-05-25
- Local data: ok
- Upstream repository: https://github.com/cargo-public-api/cargo-public-api
- Upstream latest detected: v0.52.0 (current)
## Project history and usage

cargo-public-api is a Cargo subcommand and companion tooling for listing and diffing the public API of Rust library crates.

### Project history

The GitHub repository was created in January 2022, and the crate appeared on crates.io in April 2022. The README explains that it builds rustdoc JSON and uses it to list public items or compare APIs across releases and commits.

### Adoption history

The tool is packaged on crates.io and listed in Homebrew, Nix, and Arch package facts for this batch. crates.io classifies it as both a command-line utility and a Cargo plugin, reflecting its use from local terminals and CI.

### How it is used

The README shows cargo public-api for listing a crate API, cargo public-api diff for comparing against a published version, latest release, or commit range, and a CI pattern that snapshots API output to catch unintended public API changes.

### Why package nerds care

Rust package maintainers use it to make semver review concrete: instead of manually scanning exported items, they can diff rustdoc-derived public API output and gate changes in CI.

### Timeline

- 2022: GitHub repository created and first crates.io release published.
- 2025: README compatibility matrix tied releases to specific rustdoc JSON nightly ranges.
- 2026: crates.io reported v0.52.0 as the latest release.

### Related projects

- The project relies on rustdoc JSON from the Rust toolchain.
- The README recommends public-api, rustdoc-json, and rustup-toolchain crates for CI tests.

### Sources

- <https://api.github.com/repos/cargo-public-api/cargo-public-api>
- <https://github.com/cargo-public-api/cargo-public-api>
- <https://github.com/cargo-public-api/cargo-public-api#readme>
- <https://crates.io/api/v1/crates/cargo-public-api>
- <https://formulae.brew.sh/api/formula/cargo-public-api.json>


## Security Notes

library-like package without higher-risk signals.

- **Geiger risk:** green / low
- library-like package without higher-risk signals

## Source Database Details

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

## Other Package-Manager Records

- Nix - cargo-public-api: normalized package name match | nixpkgs package indexes: pkgs/by-name/ca/cargo-public-api/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - cargo-public-api - 0.52.0-1: normalized package name match | Arch Linux sync databases: cargo-public-api from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | List and diff the public API of Rust library crates | https://github.com/cargo-public-api/cargo-public-api


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Package publisher tools](https://www.automicvault.com/pkg/package-publishers/) - Belongs to a package publishing or registry 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.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [rust](https://www.automicvault.com/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [cargo-llvm-lines](https://www.automicvault.com/pkg/brew/cargo-llvm-lines/) - Shares av.db curated category or tags: cargo, cli, code-analysis, developer-tools, rust.
- [cargo-auditable](https://www.automicvault.com/pkg/brew/cargo-auditable/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-binstall](https://www.automicvault.com/pkg/brew/cargo-binstall/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-binutils](https://www.automicvault.com/pkg/brew/cargo-binutils/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-bloat](https://www.automicvault.com/pkg/brew/cargo-bloat/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-bundle](https://www.automicvault.com/pkg/brew/cargo-bundle/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-c](https://www.automicvault.com/pkg/brew/cargo-c/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-cache](https://www.automicvault.com/pkg/brew/cargo-cache/) - Shares av.db curated category or tags: cargo, cli, developer-tools, rust.
- [cargo-careful](https://www.automicvault.com/pkg/brew/cargo-careful/) - Both packages touch the same language runtime or ecosystem. Shared terms: cargo, cli, code, developer, developer-tools.
- [cargo-clone](https://www.automicvault.com/pkg/brew/cargo-clone/) - Both packages touch the same language runtime or ecosystem. Shared terms: cargo, cli, code, developer, developer-tools.

## Combined YAML source

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


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- 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
