{"id":13423239,"url":"https://github.com/RazrFalcon/cargo-bloat","last_synced_at":"2025-03-15T15:30:51.816Z","repository":{"id":39006645,"uuid":"116590508","full_name":"RazrFalcon/cargo-bloat","owner":"RazrFalcon","description":"Find out what takes most of the space in your executable.","archived":true,"fork":false,"pushed_at":"2024-05-10T06:22:24.000Z","size":234,"stargazers_count":2338,"open_issues_count":10,"forks_count":50,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-10-29T15:04:43.806Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RazrFalcon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-07T18:50:37.000Z","updated_at":"2024-10-29T00:16:45.000Z","dependencies_parsed_at":"2025-02-24T01:32:38.135Z","dependency_job_id":"7bdbf816-d098-4ae3-9ef8-42bef05e8dab","html_url":"https://github.com/RazrFalcon/cargo-bloat","commit_stats":{"total_commits":166,"total_committers":18,"mean_commits":9.222222222222221,"dds":"0.11445783132530118","last_synced_commit":"8aa6c72ca93636c5aeeda9d95d308ba2b2fc700a"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RazrFalcon%2Fcargo-bloat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RazrFalcon%2Fcargo-bloat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RazrFalcon%2Fcargo-bloat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RazrFalcon%2Fcargo-bloat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RazrFalcon","download_url":"https://codeload.github.com/RazrFalcon/cargo-bloat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243750469,"owners_count":20342066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T00:00:25.772Z","updated_at":"2025-03-15T15:30:51.530Z","avatar_url":"https://github.com/RazrFalcon.png","language":"Rust","funding_links":[],"categories":["Tools","Rust","Cargo Subcommands"],"sub_categories":["Community Chat Rooms","Paid and commercially available materials","Rust tools"],"readme":"## cargo-bloat\n\nFind out what takes most of the space in your executable.\n\nSupports ELF (Linux, BSD), Mach-O (macOS) and PE (Windows) binaries.\n\nWASM is not supported. Use [twiggy](https://github.com/rustwasm/twiggy) instead.\n\nInspired by [google/bloaty](https://github.com/google/bloaty).\n\n### Install\n\n```bash\ncargo install cargo-bloat\n```\n\nor\n\n```bash\ncargo install cargo-bloat --no-default-features\n```\n\nif you don't need regex filtering using the `--filter` option.\n\n### Usage\n\nGet a list of the biggest functions in the release build:\n\n```\n% cargo bloat --release -n 10\nCompiling ...\nAnalyzing target/release/cargo-bloat\n\n File  .text     Size       Crate Name\n 0.9%   7.1%  27.0KiB cargo_bloat cargo_bloat::main\n 0.8%   5.7%  21.4KiB cargo_bloat cargo_bloat::process_crate\n 0.3%   2.3%   8.6KiB   [Unknown] read_line_info\n 0.3%   2.1%   7.9KiB         std std::sys::unix::process::process_common::Command::capture_env\n 0.3%   2.1%   7.8KiB        json json::parser::Parser::parse\n 0.2%   1.7%   6.5KiB   [Unknown] elf_add\n 0.2%   1.7%   6.3KiB         std __rdos_backtrace_dwarf_add\n 0.2%   1.3%   5.0KiB         std \u003crustc_demangle::legacy::Demangle as core::fmt::Display\u003e::fmt\n 0.2%   1.3%   4.9KiB         std std::sys_common::backtrace::_print\n 0.2%   1.3%   4.8KiB         std core::num::flt2dec::strategy::dragon::format_shortest\n 9.8%  73.5% 278.0KiB             And 932 smaller methods. Use -n N to show more.\n13.3% 100.0% 378.0KiB             .text section size, the file size is 2.8MiB\n```\n\nGet a list of the biggest dependencies in the release build:\n```\n% cargo bloat --release --crates\nCompiling ...\nAnalyzing target/release/cargo-bloat\n\n File  .text     Size Crate\n 8.1%  61.2% 231.5KiB std\n 2.5%  19.2%  72.4KiB cargo_bloat\n 1.2%   9.4%  35.5KiB [Unknown]\n 1.0%   7.2%  27.2KiB json\n 0.3%   2.2%   8.5KiB pico_args\n 0.1%   0.4%   1.7KiB multimap\n 0.0%   0.3%   1.1KiB memmap\n 0.0%   0.0%     175B term_size\n 0.0%   0.0%      45B time\n13.3% 100.0% 378.0KiB .text section size, the file size is 2.8MiB\n\nNote: numbers above are a result of guesswork. They are not 100% correct and never will be.\n```\n\nGet a list of the biggest functions in the release build filtered by the regexp:\n\n**Note**: you have to build `cargo-bloat` with a `regex-filter` feature enabled.\n\n```\n% cargo bloat --release --filter '^__' -n 10\nCompiling ...\nAnalyzing target/release/cargo-bloat\n\nFile .text    Size Crate Name\n0.2%  1.7%  6.3KiB   std __rdos_backtrace_dwarf_add\n0.1%  0.5%  1.9KiB   std __rdos_backtrace_qsort\n0.0%  0.2%    843B   std __udivmodti4\n0.0%  0.1%    296B   std __floattidf\n0.0%  0.1%    290B   std __floattisf\n0.0%  0.1%    284B   std __rdos_backtrace_initialize\n0.0%  0.1%    253B   std __floatuntisf\n0.0%  0.1%    253B   std __floatuntidf\n0.0%  0.1%    211B   std __rdos_backtrace_get_view\n0.0%  0.0%    180B   std __rdos_backtrace_vector_grow\n0.1%  0.7%  2.8KiB       And 37 smaller methods. Use -n N to show more.\n0.5%  3.6% 13.5KiB       filtered data size, the file size is 2.8MiB\n```\n\nFlags specific for `cargo-bloat`:\n```\n    --crates                   Per crate bloatedness\n    --filter \u003cCRATE|REGEXP\u003e    Filter functions by crate\n    --split-std                Split the 'std' crate to original crates like core, alloc, etc.\n    --no-relative-size         Hide 'File' and '.text' columns\n    --full-fn                  Print full function name with hash values\n-n \u003cNUM\u003e                       Number of lines to show, 0 to show all [default: 20]\n-w, --wide                     Do not trim long function names\n    --message-format \u003cFMT\u003e     Output format [default: table] [possible values: table, json]\n```\n\n### License\n\n*cargo-bloat* is licensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRazrFalcon%2Fcargo-bloat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRazrFalcon%2Fcargo-bloat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRazrFalcon%2Fcargo-bloat/lists"}