Giter VIP home page Giter VIP logo

Comments (11)

RazrFalcon avatar RazrFalcon commented on July 3, 2024

What about --crates flag?

I did't testes on mac yet.

from cargo-bloat.

killercup avatar killercup commented on July 3, 2024

Similar story:

$ cargo bloat --release --crates
    Finished release [optimized] target(s) in 0.0 secs
  NaN% 0B semver
  NaN% 0B httparse
  NaN% 0B cargo_edit
  NaN% 0B env_proxy
  NaN% 0B error_chain
  NaN% 0B semver_parser
  NaN% 0B crc
  NaN% 0B regex
  NaN% 0B hyper_tls
  NaN% 0B linked_hash_map
  NaN% 0B memchr
  NaN% 0B tokio_proto
  NaN% 0B hyper
  NaN% 0B security_framework
  NaN% 0B futures_cpupool
  NaN% 0B net2
  NaN% 0B serde_json
  NaN% 0B libflate
  NaN% 0B unicode_normalization
  NaN% 0B time

from cargo-bloat.

RazrFalcon avatar RazrFalcon commented on July 3, 2024

Looks like that object crate fails to parse the size.

from cargo-bloat.

killercup avatar killercup commented on July 3, 2024

Maybe filter out entries that report zero as their size?

(Also, reading your code a but, I can't help but suggest you look at the awesome structopt crate for CLI arg handling, it usually reduces the boilerplate you need to write quite a bit!)

from cargo-bloat.

RazrFalcon avatar RazrFalcon commented on July 3, 2024

I sort by size, so it's looks like all symbols have a zero size.

(cargo requires docopt, afaik).

from cargo-bloat.

killercup avatar killercup commented on July 3, 2024

Oh, maybe you need to use MachOFile for mac-specific binaries? Nah, I misunderstood how object is structured.

(Ah, you want to upstream this to cargo?)

from cargo-bloat.

RazrFalcon avatar RazrFalcon commented on July 3, 2024

I'm using the object crate that should do this for me.

(What do you mean? I'm passing the USAGE string directly to cargo)

from cargo-bloat.

RazrFalcon avatar RazrFalcon commented on July 3, 2024

I wasn't able to build it on mac, because it doesn't like system openssl...

from cargo-bloat.

repi avatar repi commented on July 3, 2024

Just tried it on Mac as well with my repo and had the same output issue

shadertoy-browser git:(master) cargo bloat --release --trim-fn -n 10
    Updating registry `https://github.com/rust-lang/crates.io-index`
    Updating registry `https://github.com/rust-lang/crates.io-index`
    Finished release [optimized + debuginfo] target(s) in 0.0 secs
  NaN% 0B [19180 Others]
  NaN% 0B _je_witness_fork_cleanup
  NaN% 0B _je_witnesses_cleanup
  NaN% 0B _main
  NaN% 0B _rust_begin_unwind
  NaN% 0B _rust_eh_personality
  NaN% 0B _sc_internal_compiler_delete
  NaN% 0B _sc_internal_compiler_msl_compile
  NaN% 0B _sc_internal_compiler_msl_new
  NaN% 0B _sc_internal_free_pointer
  NaN% 0B _sc_internal_get_latest_exception_message
100.0% 0B Total

➜  shadertoy-browser git:(master) cargo bloat --release --crates -n 10 
    Updating registry `https://github.com/rust-lang/crates.io-index`
    Updating registry `https://github.com/rust-lang/crates.io-index`            
    Finished release [optimized + debuginfo] target(s) in 0.0 secs
  NaN% 0B num_bigint
  NaN% 0B utf8_ranges
  NaN% 0B httparse
  NaN% 0B vec_map
  NaN% 0B num_cpus
  NaN% 0B serde_urlencoded
  NaN% 0B regex
  NaN% 0B clap
  NaN% 0B native_tls
  NaN% 0B tokio_proto

from cargo-bloat.

killercup avatar killercup commented on July 3, 2024

from cargo-bloat.

RazrFalcon avatar RazrFalcon commented on July 3, 2024

Too long =)

But I will think about it.

from cargo-bloat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.