Skip to content

Specify config file on the command line #6648

Closed
@brson

Description

@brson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cliArea: Command-line interface, option parsing, etc.A-configurationArea: cargo config files and env varsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions