From fa7793c05f09c6071f920662b6232f51f4203b5e Mon Sep 17 00:00:00 2001 From: Patrick Roy Date: Fri, 26 Sep 2025 17:05:55 +0100 Subject: [PATCH] add cargo-all-features to container Some crates have a myriad of features, and it is very easy to accidentally mess up imports in a way that `cargo check --all-features` works, but only compiling with only a subset of features breaks. For this scenario, cargo check-all-features can help, as it will attempt to compile all feature permutations. We can even add this to the default CI, even for crates like vhost that have incompatible features, due to cargo-all-features allowing the elimination of incompatible features from the test matrix [1]. Some usecases where this could have been helpful is in vm-memory, where we have tens of feature permutations, and some of them invariably get broken regularly [2], or in crates that have no-std support that is offered via an opt-out 'std' feature [3] [1]: https://crates.io/crates/cargo-all-features#options [2]: https://github.com/rust-vmm/vm-memory/pull/350 [3]: https://github.com/rust-vmm/vm-allocator/pull/107 Signed-off-by: Patrick Roy --- build_container.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_container.sh b/build_container.sh index 2612ae3..8baef59 100755 --- a/build_container.sh +++ b/build_container.sh @@ -98,6 +98,8 @@ if [ "$ARCH" != "riscv64" ]; then popd fi +cargo install cargo-all-features + # Install some dependencies required by vhost-device crates but not available # in Ubuntu repos. # Some of these do not support riscv64, since vhost-device crates do not