Hello,
I have a project for which some machines have only a subset of features set. Currently, I write
cargo run --no-default-features --features "toto,titi" --bin my_bin
This is a bit cumbersome and I sometimes forget the --no-default-features --features
part.
I was wondering if there is a local config file that I could put in the directory to instruct cargo to use this particular subset of features.
I guess this should be in the documentation, but I didn’t find it.
This would look like it would be what I am looking for, but the documentation of the configuration file does not mention features.
https://doc.rust-lang.org/cargo/reference/manifest.html
it’s the sixth from the bottom in the table of contents
It is indeed in the manifest reference, but not in the configuration reference from https://doc.rust-lang.org/cargo/reference/config.html#configuration-format. I have tried anyway to create a
.cargo/config.toml
file at the project root, with the contentbut cargo does not seem to take it into account.