Closed Dirreke closed 1 year ago
@Dirreke The first question is that the 'git2' crate depends on 'libgit2', and 'git2' is optional. https://github.com/baoyachi/shadow-rs/blob/cea1b1a2cfaaff415e3113855cb30196d6f4ff2d/Cargo.toml#L29-L37
It is possible to make 'git2' in shadow-rs optional. Please refer to the configuration.
shadow-rs = { version = "0.21.0", default-features = false }
@Dirreke The second question is that shadow-rs supports blacklist filtering, where certain const values will not be generated by using the 'new_deny' method. See:https://docs.rs/shadow-rs/latest/shadow_rs/fn.new_deny.html
use std::collections::BTreeSet;
fn main() -> shadow_rs::SdResult<()> {
let mut deny = BTreeSet::new();
deny.insert(shadow_rs::CARGO_TREE);
shadow_rs::new_deny(deny)
}
@baoyachi
Yeah, you are right.
I can use features git2
in build-denpendencies
and no git2
in denpencies
. By this, I can get all info. Thanks
@Dirreke Feel happy for you, please feel free to contact me if you have any questions.
I want to use this crate for target wasm. However, some dependencies like
libgit2
can not be compiled for it.Therefore, I want to use shadow-rs only in buld-denpendencies but not in denpendencies. However, the const
CLAP_*
in theshadow.rs
, which be created by build.rs, use the shadow-rs to format, and I can not deny it by add it indeny
.So can it make
CLAP_*
optional or make it is just the&str
but notshadow_rs::*
? Thanks!