cargo-bloat

Analyze executable size and find what consumes the most space

brewmacoslinux
Try with needOr install directly
Source

About

Find out what takes most of the space in your executable

Commands

cargo-bloat

Examples

Analyze the current project's release binary for size$ cargo bloat --release
Show top 20 largest functions in the binary$ cargo bloat --release -n 20
Analyze a debug build and show crate-level breakdown$ cargo bloat