I usually do
-
Look into Cargo.lock
cargo check --verbose --job 1 --unit-graph -Z unstable-options
- cargo tree
I have the case
- A has
std
feature.
- It uses B having
std
, sure when A has std
.
- B uses C. C has
std
too. But be forgot to enable std
on C.
- So when I compile A, it fails, because we are in
std
feature, but C did not enabled it.
In some codebase it hard to debug - when there are dozens of crates in several layers with several adhoc features (I work at such). I use above tooling.
Would be awesome to have some oneliner to see all features in crates, why they are enabled or not.