Giter VIP home page Giter VIP logo

Comments (6)

RazrFalcon avatar RazrFalcon commented on June 24, 2024

cargo bloat, as expected, uses cargo. So it works exactly like cargo and can't behave differently.

Maybe you want to use --bin and --example flags?

from cargo-bloat.

jonhoo avatar jonhoo commented on June 24, 2024

It doesn't seem like that's the case here? With cargo I can run cargo in a particular subcrate and have it operate only on that crate (including only its dependencies and relevant Cargo.toml file). There's also cargo -p that lets you do the same. But cargo-bloat seems to always operate on the entire workspace?

from cargo-bloat.

RazrFalcon avatar RazrFalcon commented on June 24, 2024

Can you make an example or give a link to the repo? At the moment, cargo-bloat behaves exactly as cargo itself. There are no specific code for this.

from cargo-bloat.

jonhoo avatar jonhoo commented on June 24, 2024

The repository I linked to in the post above is an example. If you clone it and run, say, cargo check inside of the basics/ directory, it will only compile things relevant to that crate. If you run cargo bloat, it will complain about the unsupported feature in benchmarks/Cargo.toml, even though that's not related to basics at all.

from cargo-bloat.

jonhoo avatar jonhoo commented on June 24, 2024

I can work around this by removing "benchmarks" from the workspace list in /Cargo.toml. Interestingly enough, it looks like cargo bloat doesn't compile the code in the other crates, it just parses all of their Cargo.toml files. So I guess then this is probably working as intended. I just saw the weird behavior because the older cargo version used by cargo-bloat fails to parse. Closing!

from cargo-bloat.

RazrFalcon avatar RazrFalcon commented on June 24, 2024

Good. But I still plan to implement this, so I will reopen 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.