-
Notifications
You must be signed in to change notification settings - Fork 51
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
Allow use with Cargo's "build-std" feature #62
Comments
As a workaround, you can simply use |
Yes, I was hoping I don't see how to use |
I'll see what I can do. No idea. I haven't used |
Thanks :-) Yeah, |
Ran into the same issue, wanted to share my workaround in case it helps. You can add some variation of the following to your
Then you can run More generally, maybe a blurb on using |
I just have to support |
Cargo has a recent nightly-only feature for building the Rust standard library (std) as part of a normal build: https://github.com/rust-lang/wg-cargo-std-aware
Consider this example project:
cargo-bloat
works properly here:It generates this output:
Cargo's new
build-std
feature can reduce the executable size:cargo-bloat
doesn't work with this build method:The above results in this error:
If
cargo-bloat
would pass along the various nightly-only-Z
arguments tocargo build
, it could be used successfully. As a proof-of-concept, here is acargo
shim to force thebuild-std
arguments:The shim assumes the toolchain "nightly-2020-08-20" for convenience. Now
cargo-bloat
works properly:PATH="$PWD/cargo-bin:$PATH" cargo bloat --release \ --target x86_64-unknown-linux-gnu
It generates this output:
Would it be possible to add support for Cargo's
build-std
feature tocargo-bloat
?The text was updated successfully, but these errors were encountered: