macOS
brew install cargo-bloatlocal Homebrew formula metadata
brew
Find out what takes most of the space in your executable. Version 0.12.1 via Homebrew; verified from local package data.
install
brew install cargo-bloatlocal Homebrew formula metadata
sudo apk add cargo-bloatAlpine Linux edge package indexes · cargo-bloat · source: dl-cdn.alpinelinux.org
nix profile install nixpkgs#cargo-bloatnixpkgs package indexes · pkgs/by-name/ca/cargo-bloat/package.nix · source: api.github.com
sudo pacman -S cargo-bloatArch Linux sync databases · cargo-bloat · source: geo.mirror.pkgbuild.com
overview
Find out what takes most of the space in your executable
history
cargo-bloat is a Cargo subcommand for explaining where compiled Rust binary size goes. It analyzes release artifacts and reports the largest functions or crates contributing to executable text size.
Yevhenii Reizner's cargo-bloat repository was created in January 2018, and version 0.1.0 was published to crates.io a few days later. The README describes the package as a way to find what takes most of the space in an executable, with support for ELF, Mach-O, and PE binaries.
The project was explicitly inspired by Google's Bloaty binary size profiler while adopting a Rust/Cargo-specific interface. Over later releases it added and kept options such as per-crate views, filtering, splitting standard-library crates, full function names, wide output, and JSON output.
cargo-bloat spread because Rust developers regularly need size explanations for CLI tools, embedded-adjacent binaries, WebAssembly-adjacent investigations, and release optimization. Crates.io places it in the Cargo plugins category and reports more than 360,000 downloads.
Its package-manager footprint is broader than a one-off Cargo plugin: the input records Homebrew, Alpine, Nix, and Arch packaging. That matters because size-analysis tools are often installed globally on developer machines and CI images rather than vendored into projects.
The common path is `cargo install cargo-bloat` and then `cargo bloat --release -n 10` to list the largest functions in the release build. `cargo bloat --release --crates` switches the view to crate-level contribution.
The README emphasizes that per-crate numbers are estimates, not exact accounting. It also notes that WebAssembly is not supported and points users toward twiggy for that use case.
cargo-bloat is a classic package-nerd tool because it turns compiler output into a ranked table that directly informs dependency choices. It is one of the Rust ecosystem's small, sharp CLI packages that makes invisible package cost visible.
Its relationship to Bloaty and twiggy also shows how Rust packaging borrowed from general binary-analysis culture while building Cargo-native workflows for Rust developers.
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.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
cargo-bloat | 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/RazrFalcon/cargo-bloat
install metadata
| Package key | brew:cargo-bloat |
|---|---|
| Version | 0.12.1 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/cargo-bloat |
| Homepage | https://github.com/RazrFalcon/cargo-bloat |
| Repository | https://github.com/RazrFalcon/cargo-bloat |
| Upstream docs | https://github.com/RazrFalcon/cargo-bloat#readme |
| License | MIT |
| Source archive | https://github.com/RazrFalcon/cargo-bloat/archive/refs/tags/v0.12.1.tar.gz |
| Build dependencies | rust |
| Bottle | available (on arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, monterey, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | cargo-bloat |
| 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 |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
cargo-bloat
nix profile install nixpkgs#cargo-bloatcargo-bloat 0.12.1-r0
Find out what takes most of the space in your Rust executable
https://github.com/RazrFalcon/cargo-bloat
sudo apk add cargo-bloatcargo-bloat 0.12.1-2
Find out what takes most of the space in your executable
https://github.com/RazrFalcon/cargo-bloat
sudo pacman -S cargo-bloatsource 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.