Specify config file on the command line · Issue #6648 · rust-lang/cargo (original) (raw)

Several times I've wanted to have a config file (not a full manifest) in my repo that is not on the config search path, but that I can invoke on demand to change cargo's behavior.

One example of this is tikv/tikv#4189, where I am trying to add a "custom profile" by using config profiles. I only want to use this profile in certain situations, and would rather not enable it by copying the config file into cargo's search path, but by directly telling cargo to use that config.

Describe the solution you'd like

cargo build --config etc/release.config, like cargo build --manifest-path.