Cargo, flags for dependencies

Hi All,

I am working on a project that has both an open and closed source part.

I split the project between a root crate and few other dependency, auxiliary, crates.

Now I would like to use features flags to activate or not some option, however I do need to pass the same flags not only to the root crate but also to the crates on which the root depends on, the “auxiliary” crates.

I wasn’t able to find a solution to this problem. Is some of you aware of what I could try?



Cargo allows re-exporting a dependent crate’s features via your own crate. There’re some examples in the docs:

1 Like

Thank you :slight_smile: