🍺 BREW Explorer

← all formulae

cargo-public-api

brew install cargo-public-api v0.52.0 MIT

List and diff the public API of Rust library crates

28
30-day installs · #6010
48
90-day · #7419
259
365-day · #6696
557
★ GitHub stars · updated 2mo ago

Build dependencies

GitHub topics

api cargo cargo-plugin cargo-subcommand diff rust rustdoc-json semver

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [
    "pkgconf",
    "rust"
  ],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "List and diff the public API of Rust library crates",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:36:09+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "cargo-public-api",
  "github_default_branch": "main",
  "github_last_commit_at": "2026-06-17T04:44:00Z",
  "github_readme_excerpt": "# cargo-public-api\n\nList and diff the public API of Rust library crates between releases and commits. Detect breaking API changes and semver violations via CI or a CLI. Relies on and automatically builds [rustdoc JSON](https://github.com/rust-lang/rust/issues/76578), for which a recent version of the Rust nightly toolchain must be installed.\n\n# Installation\n\nInstall the `cargo public-api` subcommand with a recent regular **stable** Rust toolchain:\n\n```sh\ncargo +stable install cargo-public-api\n```\n\nEnsure **nightly-2025-08-02** or later is installed (does not need to be the active toolchain) so `cargo public-api` can build rustdoc JSON for you:\n\n```sh\nrustup install nightly --profile minimal\n```\n\n# Usage\n\n## List the Public API\n\nThis example lists the public API of the `regex` crate. First we clone the repo:\n\n```sh\ngit clone https://github.com/rust-lang/regex ; cd regex\n```\n\nNow we can list the public API of `regex` by running\n\n```sh\ncargo public-api\n```\n\nwhich will print the public API of `regex` with one line per public item in the API:\n\n\u003cimg src=\"https://github.com/cargo-public-api/cargo-public-api/raw/main/docs/img/list-truncated.webp\" alt=\"colored output of listing a public api\"\u003e\n\n## Diff the Public API\n\n### \u2026 Against a Specific Published Version\n\nTo diff the public API of the `regex` crate in the **current directory** against  **published version 1.6.0** on [crates.io](https://crates.io/crates/regex/1.6.0):\n\n```sh\ncargo public-api diff 1.6.0\n```\n\n\u003cimg src=\"https://github.com/cargo-public-api/cargo-public-api/raw/main/docs/img/diff-specific-published-version.webp\" alt=\"colored output of diffing a public api\"\u003e\n\n\n### \u2026 Against the Latest Published Version\n\n```sh\ncargo public-api diff latest\n```\n\n### \u2026 Between Git Commits\n\n```sh\ncargo public-api diff ref1..ref2\n```\n\n### \u2026 as a CI Check\n\n\u003c!-- Keep this section in sync with ./public-api/README.md#public-api-surface-test-in-ci --\u003e\n\nWith a regular `cargo test` that you run in CI you will be able to\n* prevent accidental",
  "github_repo": "cargo-public-api/cargo-public-api",
  "github_stars": 557,
  "github_topics": [
    "api",
    "cargo",
    "cargo-plugin",
    "cargo-subcommand",
    "diff",
    "rust",
    "rustdoc-json",
    "semver"
  ],
  "homepage": "https://github.com/cargo-public-api/cargo-public-api",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 28,
  "installs_365d": 259,
  "installs_90d": 48,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "MIT",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "cargo-public-api",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 6010,
  "rank_365d": 6696,
  "rank_90d": 7419,
  "raw_hash": "9c387262b48bb0e6",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/c/cargo-public-api.rb",
  "tap": "homebrew/core",
  "test_dependencies": [
    "rustup"
  ],
  "uses_from_macos": [
    "curl"
  ],
  "version_head": "HEAD",
  "version_stable": "0.52.0",
  "versioned_formulae": [],
  "why_use_this": null
}