Automic VaultAutomic Vault

brew

使用 Homebrew, apk, Nix, pacman 安装 cargo-bloat

查看 cargo-bloat 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install cargo-bloat

local Homebrew formula metadata

Linux

Alpine Linux apk已验证 · 92%
sudo apk add cargo-bloat

Alpine Linux edge package indexes · cargo-bloat · 来源: dl-cdn.alpinelinux.org

Nix已验证 · 92%
nix profile install nixpkgs#cargo-bloat

nixpkgs package indexes · pkgs/by-name/ca/cargo-bloat/package.nix · 来源: api.github.com

Arch Linux pacman已验证 · 92%
sudo pacman -S cargo-bloat

Arch Linux sync databases · cargo-bloat · 来源: geo.mirror.pkgbuild.com

概览

软件包摘要

Find out what takes most of the space in your executable

命令和别名

  • cargo-bloat

历史

项目历史与用法

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.

时间线

  • 2018-01-07: GitHub repository RazrFalcon/cargo-bloat was created.
  • 2018-01-11: cargo-bloat 0.1.0 was published on crates.io.
  • 2018-2020: The 0.2 through 0.10 releases iterated quickly on Cargo-plugin binary-size reporting.
  • 2022-06-04: Version 0.11.1 was published.
  • 2024-05-10: Version 0.12.1 was published.

Related projects

  • google/bloaty is cited by the README as an inspiration.
  • rustwasm/twiggy is recommended by the README for WebAssembly size analysis.
  • Cargo's plugin mechanism provides the `cargo bloat` subcommand interface.

来源

  • GitHub repository API metadata: https://api.github.com/repos/RazrFalcon/cargo-bloat
  • Official README: https://github.com/RazrFalcon/cargo-bloat#readme
  • Package-manager adoption from source_facts.package-manager.
  • crates.io API metadata and versions: https://crates.io/api/v1/crates/cargo-bloat

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 10 个平台目标。
  • 构建元数据列出 1 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
cargo-bloatcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-25
管理器版本0.12.1
管理器更新时间
本地数据OK
上游当前
检测到的最新版本v0.12.1

https://github.com/RazrFalcon/cargo-bloat

  • 信息No package-manager update timestamp was available.低 置信度

安装元数据

软件包元数据

软件包键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 DatabaseHomebrew formula API
Taphomebrew/core
Full Namecargo-bloat
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Nix95%

cargo-bloat

nix profile install nixpkgs#cargo-bloat
  • normalized package name match
  • 匹配方式:Cargo Bloat
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/ca/cargo-bloat/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
apk95%

cargo-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-bloat
  • License: MIT
  • Architecture: x86_64
  • Source Package: cargo-bloat
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Cargo Bloat
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: cargo-bloat from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
pacman95%

cargo-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
  • License: MIT
  • Architecture: x86_64
  • 3 依赖
  • normalized package name match
  • 匹配方式:Cargo Bloat
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: cargo-bloat from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

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