Skip to main content

Build provenance: This package is built and distributed by Astral as part of astral-dev-toolchain. It packages cargo-bloat from tag v0.12.1 at commit 69ccabda2b1671c4fd675e9a660af29ee985506f.


cargo-bloat

Find out what takes most of the space in your executable.

Supports ELF (Linux, BSD), Mach-O (macOS) and PE (Windows) binaries.

WASM is not supported. Use twiggy instead.

Inspired by google/bloaty.

Install

cargo install cargo-bloat

or

cargo install cargo-bloat --no-default-features

if you don't need regex filtering using the --filter option.

Usage

Get a list of the biggest functions in the release build:

% cargo bloat --release -n 10
Compiling ...
Analyzing target/release/cargo-bloat

 File  .text     Size       Crate Name
 0.9%   7.1%  27.0KiB cargo_bloat cargo_bloat::main
 0.8%   5.7%  21.4KiB cargo_bloat cargo_bloat::process_crate
 0.3%   2.3%   8.6KiB   [Unknown] read_line_info
 0.3%   2.1%   7.9KiB         std std::sys::unix::process::process_common::Command::capture_env
 0.3%   2.1%   7.8KiB        json json::parser::Parser::parse
 0.2%   1.7%   6.5KiB   [Unknown] elf_add
 0.2%   1.7%   6.3KiB         std __rdos_backtrace_dwarf_add
 0.2%   1.3%   5.0KiB         std <rustc_demangle::legacy::Demangle as core::fmt::Display>::fmt
 0.2%   1.3%   4.9KiB         std std::sys_common::backtrace::_print
 0.2%   1.3%   4.8KiB         std core::num::flt2dec::strategy::dragon::format_shortest
 9.8%  73.5% 278.0KiB             And 932 smaller methods. Use -n N to show more.
13.3% 100.0% 378.0KiB             .text section size, the file size is 2.8MiB

Get a list of the biggest dependencies in the release build:

% cargo bloat --release --crates
Compiling ...
Analyzing target/release/cargo-bloat

 File  .text     Size Crate
 8.1%  61.2% 231.5KiB std
 2.5%  19.2%  72.4KiB cargo_bloat
 1.2%   9.4%  35.5KiB [Unknown]
 1.0%   7.2%  27.2KiB json
 0.3%   2.2%   8.5KiB pico_args
 0.1%   0.4%   1.7KiB multimap
 0.0%   0.3%   1.1KiB memmap
 0.0%   0.0%     175B term_size
 0.0%   0.0%      45B time
13.3% 100.0% 378.0KiB .text section size, the file size is 2.8MiB

Note: numbers above are a result of guesswork. They are not 100% correct and never will be.

Get a list of the biggest functions in the release build filtered by the regexp:

Note: you have to build cargo-bloat with a regex-filter feature enabled.

% cargo bloat --release --filter '^__' -n 10
Compiling ...
Analyzing target/release/cargo-bloat

File .text    Size Crate Name
0.2%  1.7%  6.3KiB   std __rdos_backtrace_dwarf_add
0.1%  0.5%  1.9KiB   std __rdos_backtrace_qsort
0.0%  0.2%    843B   std __udivmodti4
0.0%  0.1%    296B   std __floattidf
0.0%  0.1%    290B   std __floattisf
0.0%  0.1%    284B   std __rdos_backtrace_initialize
0.0%  0.1%    253B   std __floatuntisf
0.0%  0.1%    253B   std __floatuntidf
0.0%  0.1%    211B   std __rdos_backtrace_get_view
0.0%  0.0%    180B   std __rdos_backtrace_vector_grow
0.1%  0.7%  2.8KiB       And 37 smaller methods. Use -n N to show more.
0.5%  3.6% 13.5KiB       filtered data size, the file size is 2.8MiB

Flags specific for cargo-bloat:

    --crates                   Per crate bloatedness
    --filter <CRATE|REGEXP>    Filter functions by crate
    --split-std                Split the 'std' crate to original crates like core, alloc, etc.
    --no-relative-size         Hide 'File' and '.text' columns
    --full-fn                  Print full function name with hash values
-n <NUM>                       Number of lines to show, 0 to show all [default: 20]
-w, --wide                     Do not trim long function names
    --message-format <FMT>     Output format [default: table] [possible values: table, json]

License

cargo-bloat is licensed under the MIT license.

Release files for astral-dev-toolchain-cargo-bloat 0.12.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for astral-dev-toolchain-cargo-bloat 0.12.1
File
astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-win_arm64.whl Python 3 none Windows ARM64 Details
astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details
astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-macosx_10_12_x86_64.whl Python 3 none macOS 10.12+ x86-64 Details

Total release size: 3.5 MB

Release files / astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-win_arm64.whl

Download URL astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-win_arm64.whl
Size 507.5 kB
Tags Python 3 Windows ARM64
SHA-256 checksum
How to use checksums
c51bf77df71e4627257c3a9bc69ebbf92bb4d054e17b03e0577efed5faa7ce1b
BLAKE2b-256 checksum
How to use checksums
0cbbfb9604ddf09c907e943f89da6f4787b007512e921c2a9af4208c62b52d29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release files / astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-win_amd64.whl

Download URL astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-win_amd64.whl
Size 545.8 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
444ffff7124f1eb1622385deef3df60094025dd5ca3137c661d57c1953799f42
BLAKE2b-256 checksum
How to use checksums
f6ee383e7b0664bae9ae1ad905f810406a303fd83b1a8cb07ae0b4e11c8244fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release files / astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 622.8 kB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
2bab27ed44b6154ec63658aa5097e8b989744f262ddfba7d12e2f130980e0864
BLAKE2b-256 checksum
How to use checksums
547c1dcf3eb9d5d2c688eb58bccc6a9a1c480388922f0549442aa66baa326a4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release files / astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 588.4 kB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
d673c8a5e4913031a3c795c4c79795de994fdc80363768a70c3c5c57216cbaaf
BLAKE2b-256 checksum
How to use checksums
5fcf79c2618a6df399d067bf2d31ab9dd6b8c2ad3451e1532d8a823174f20b14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release files / astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-macosx_11_0_arm64.whl

Download URL astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-macosx_11_0_arm64.whl
Size 619.7 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e3db746ff71ba3fd7f7a0f979d4e05fcd82825b0f0ab9284e3ecacfd7aaa450f
BLAKE2b-256 checksum
How to use checksums
eb7ccfc451c88351881a3874d684385b11ce7e0b359c11e5f618abee7389a13c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release files / astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-macosx_10_12_x86_64.whl

Download URL astral_dev_toolchain_cargo_bloat-0.12.1-py3-none-macosx_10_12_x86_64.whl
Size 641.6 kB
Tags Python 3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f06b0381c56c6c36301bd05a27fddae95d21f13583c1deeea00c9d5113adebfc
BLAKE2b-256 checksum
How to use checksums
d8cfe92161194224ce80f8696e9226578bf9a9ca970bffa0842c05b2012ee65e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.12.1 This release

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page