# razrfalcon/cargo-bloat

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/razrfalcon-cargo-bloat).**

2,718 stars · 57 forks · Rust · mit

## Links

- GitHub: https://github.com/RazrFalcon/cargo-bloat
- awesome-repositories: https://awesome-repositories.com/repository/razrfalcon-cargo-bloat.md

## Description

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.

## Tags

### Operating Systems & Systems Programming

- [Binary Bloat Analysis](https://awesome-repositories.com/f/operating-systems-systems-programming/binary-analysis-capabilities/binary-bloat-analysis.md) — Identifies functions and dependencies consuming the most space in compiled Rust executables. ([source](https://github.com/RazrFalcon/cargo-bloat/blob/master/CHANGELOG.md))
- [Executable Format Mappings](https://awesome-repositories.com/f/operating-systems-systems-programming/binary-section-resolvers/executable-format-mappings.md) — Provides a unified internal representation for different executable formats like ELF and Mach-O.
- [Cross-Format Binary Analysis](https://awesome-repositories.com/f/operating-systems-systems-programming/cross-format-binary-analysis.md) — Analyzes binaries across different platforms and formats using a consistent analysis interface. ([source](https://github.com/RazrFalcon/cargo-bloat/blob/master/CHANGELOG.md))
- [Debug Symbol Parsers](https://awesome-repositories.com/f/operating-systems-systems-programming/debug-symbol-parsers.md) — Implements parsing of DWARF debug symbols to map binary bloat to source code locations.

### Development Tools & Productivity

- [Build Profiles](https://awesome-repositories.com/f/development-tools-productivity/build-profiles.md) — Compares how different compiler options and build profiles affect the final Rust binary size.
- [Cargo Profile Configurations](https://awesome-repositories.com/f/development-tools-productivity/build-profiles/cargo-profile-configurations.md) — Analyzes how various Cargo profiles and compiler flags affect the total binary size. ([source](https://github.com/RazrFalcon/cargo-bloat/blob/master/CHANGELOG.md))
- [Rust Compilation Configurations](https://awesome-repositories.com/f/development-tools-productivity/build-tooling/build-orchestration-logic/build-orchestration-configuration/build-configuration-systems/compiler-configurations/rust-compilation-configurations.md) — Analyzes Rust compilation outputs to locate space-consuming code and bloat.
- [Build Toolchains](https://awesome-repositories.com/f/development-tools-productivity/build-toolchains.md) — Integrates with the Rust toolchain to invoke the compiler with specific profiles before analyzing output.
- [Symbol Filtering](https://awesome-repositories.com/f/development-tools-productivity/symbol-filtering.md) — Filters binary functions using regular expressions to isolate specific code paths for size analysis.

### Programming Languages & Runtimes

- [Binary Size Optimizations](https://awesome-repositories.com/f/programming-languages-runtimes/binary-size-optimizations.md) — Identifies large functions and dependencies in Rust executables to reduce the final disk footprint.
- [Binary Bloat Analyzers](https://awesome-repositories.com/f/programming-languages-runtimes/language-ecosystems-tooling/programming-environments-tooling/rust-environments/binary-bloat-analyzers.md) — Identifies the largest functions and dependencies in compiled Rust binaries to reduce executable size.
- [Executable Size Analysis](https://awesome-repositories.com/f/programming-languages-runtimes/rust-program-analysis/executable-size-analysis.md) — Examines compiled Rust binaries to identify which components consume the most disk space.
- [Symbol Size Profilers](https://awesome-repositories.com/f/programming-languages-runtimes/symbol-size-profilers.md) — Exports binary symbol data into tables or JSON to monitor the footprint of Rust crates.

### Software Engineering & Architecture

- [Symbol-To-Address Mapping](https://awesome-repositories.com/f/software-engineering-architecture/reference-management/symbolic-reference-tracing/symbol-to-address-mapping.md) — Maps memory addresses to function names and calculates their exact size within the compiled binary.
- [Embedded Systems Development](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/application-targets-domains/embedded-systems-development.md) — Helps reduce the memory footprint of Rust programs for resource-constrained embedded hardware.

### System Administration & Monitoring

- [Analysis Result Filtering](https://awesome-repositories.com/f/system-administration-monitoring/analysis-result-filtering.md) — Isolates specific symbols or components using regular expressions to determine a subset's data size. ([source](https://github.com/RazrFalcon/cargo-bloat/blob/master/CHANGELOG.md))

### Part of an Awesome List

- [Development Tools](https://awesome-repositories.com/f/awesome-lists/devtools/development-tools.md) — Analyzes binary size to identify space-consuming code.
