macOS
brew install cargo-bloatlocal Homebrew formula metadata
安装
brew install cargo-bloatlocal Homebrew formula metadata
sudo apk add cargo-bloatAlpine Linux edge package indexes · cargo-bloat · 来源: dl-cdn.alpinelinux.org
nix profile install nixpkgs#cargo-bloatnixpkgs package indexes · pkgs/by-name/ca/cargo-bloat/package.nix · 来源: api.github.com
sudo pacman -S cargo-bloatArch Linux sync databases · cargo-bloat · 来源: geo.mirror.pkgbuild.com
概览
Find out what takes most of the space in your executable
历史
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.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
cargo-bloat | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/RazrFalcon/cargo-bloat
安装元数据
| 软件包键 | brew:cargo-bloat |
|---|---|
| 版本 | 0.12.1 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/cargo-bloat |
| 主页 | https://github.com/RazrFalcon/cargo-bloat |
| 仓库 | https://github.com/RazrFalcon/cargo-bloat |
| 上游文档 | https://github.com/RazrFalcon/cargo-bloat#readme |
| 许可证 | MIT |
| 源码归档 | https://github.com/RazrFalcon/cargo-bloat/archive/refs/tags/v0.12.1.tar.gz |
| 构建依赖 | rust |
| Bottle | 可用 (于 arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, monterey, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| 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 |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
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-bloat来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.