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

Allow disabling the CARGO_TREE variable in the output as it can contain sensitive information #114

kleinesfilmroellchen opened this issue Oct 3, 2022 · 3 comments


Copy link

CARGO_TREE includes the dependency tree. This in turn will include the full file system path for any path dependencies, as is common for multi-crate projects. The file system path may contain sensitive information, and I do not want to rely on the linker removing CARGO_TREE from the built binary if I don't use it; I must be sure that the compiler never sees it.

Therefore I'm just asking for the ability to disable this build information variable via a feature flag or a build script configuration option.

Copy link

I can support. I'm try do it.

Copy link

baoyachi commented Dec 30, 2022

hi @kleinesfilmroellchen
I'm sorry I was a little late in solving this issue, but the new version can solve the problem you mentioned. Please use :

shadow-rs = "0.20.0"

see detail:


use std::collections::BTreeSet;

fn main() -> shadow_rs::SdResult<()> {
   let mut deny = BTreeSet::new();

Copy link
Contributor Author

@baoyachi tyvm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants