Feature request: exclude crates from workspace at build time #2375
Labels
[C] Feature / Enhancement
A new feature request or enhancement to an existing feature.
[E] User Experience
An UX enhancement for an existing feature. Including deprecation of an existing one.
T-User
Tag user issues / requests
Requested feature
When building a workspace under kani, add the option to exclude certain crates from the build. Right now this functionality can be achieved by providing a list of the crates that should be built with kani and excluding the target crates from that list.
This is not feasible to use when you have a workspace with lots of crates, out of which you want to exclude a comparatively small number. Instead, it would be nice to be able to specify a list of crates to exclude.
Use case
We are using kani in our project where we have 17 crates in one workspace. Out of these crates 2 binary crates are only relevant for Rust integration tests and we don't want to build them under kani. It is not feasible for us to pass 15 crates to the
--package
option, so what we do instead is that we usecfg(kani)
to define a dummy main for the test related crates. This is making the code harder to read that it would be necessary, and it would be nice to exclude the test crates directly at build time instead.Link to relevant documentation (Rust reference, Nomicon, RFC)
Cargo also defines a
--exclude
flag: https://doc.rust-lang.org/cargo/commands/cargo-build.html#package-selectionThe text was updated successfully, but these errors were encountered: