cargo-bloat is a binary size analyzer and compilation analysis tool for Rust. It identifies the largest functions and dependencies within compiled executables to locate space-consuming code and reduce the overall binary footprint.
The tool functions as a build profile inspector and symbol size profiler, allowing users to analyze how different compiler options and build profiles affect the final binary size. It can export symbol data into human-readable tables or JSON format to monitor the footprint of specific crates.
Capabilities include multi-target analysis across different platforms and formats, as well as the use of regular expressions to filter symbols and isolate specific code paths. The tool integrates with the Rust toolchain to execute builds and evaluate the resulting binary sections.