Select `cargo` build profile with an environment variable?

I'm looking for a way to avoid having to handle --profile <profile> manually in every script and every cargo invocation, and there doesn't seem to be any.

Seems a bit weird. I can change linkers, compiler flags, including changing them per target using env vars, but not one of the most common arguments?

Did I overlook something? Are there any good reasons not to have some CARGO_BUILD_PROFILE support? Do you think it's a good idea worth pushing forward?

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.