Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo-bloat: init at 0.6.2 #59767

Merged
merged 1 commit into from Apr 18, 2019
Merged

cargo-bloat: init at 0.6.2 #59767

merged 1 commit into from Apr 18, 2019

Conversation

xrelkd
Copy link
Contributor

@xrelkd xrelkd commented Apr 17, 2019

Motivation for this change

A tool and Cargo subcommand that helps you find out what takes most of the space in your Rust executable.
https://github.com/RazrFalcon/cargo-bloat

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@marsam
Copy link
Contributor

marsam commented Apr 18, 2019

@GrahamcOfBorg build cargo-bloat

@marsam marsam merged commit 986fd4c into NixOS:master Apr 18, 2019
@marsam
Copy link
Contributor

marsam commented Apr 18, 2019

built and tested locally

$ cargo-bloat bloat
Compiling ...
Analyzing target/debug/validation

 File  .text     Size     Crate Name
20.4%  49.5%  61.6KiB           [366 Others]
 3.5%   8.4%  10.5KiB [Unknown] _read_line_info
 2.5%   6.1%   7.6KiB       std ___rdos_backtrace_dwarf_add
 1.6%   3.8%   4.8KiB       std rustc_demangle::demangle
 1.6%   3.8%   4.7KiB [Unknown] _read_attribute
 1.5%   3.7%   4.6KiB       std std::sys_common::backtrace::print
 1.5%   3.6%   4.5KiB       std <rustc_demangle::Demangle<'a> as core::fmt::Display>::fmt
 1.1%   2.6%   3.2KiB [Unknown] __mh_execute_header
 0.9%   2.2%   2.7KiB [Unknown] _read_function_entry
 0.7%   1.8%   2.2KiB       std core::str::pattern::StrSearcher::new
 0.6%   1.5%   1.9KiB [Unknown] _add_function_ranges
 0.6%   1.5%   1.9KiB       std ___rdos_backtrace_qsort
 0.6%   1.5%   1.8KiB [Unknown] _add_unit_ranges
 0.6%   1.5%   1.8KiB [Unknown] _find_address_ranges
 0.6%   1.5%   1.8KiB [Unknown] _dwarf_lookup_pc
 0.6%   1.4%   1.8KiB       std _macho_try_dwarf
 0.5%   1.2%   1.5KiB       std <str as core::fmt::Debug>::fmt
 0.5%   1.1%   1.4KiB       std std::sys_common::gnu::libbacktrace::resolve_symname
 0.5%   1.1%   1.4KiB       std core::fmt::Formatter::pad_integral
 0.4%   1.1%   1.3KiB       std core::fmt::Formatter::pad
 0.4%   1.1%   1.3KiB       std std::sys_common::backtrace::output_fileline
41.3% 100.0% 124.5KiB           .text section size, the file size is 301.3KiB

Thanks!

@xrelkd xrelkd deleted the add/cargo-bloat branch April 18, 2019 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants