Open aumetra opened 1 year ago
The offending code, with comment giving some context:
I hadn't considered straight up reading the flags out of Cargo's config, that's an interesting idea... (wonder if it's exposed in guppy/cargo-metadata already...)
Adding arbitrary env vars is also probably just the more useful/general/simple feature tho
I would take the issue for arbitrary env vars, if that's fine
@aumetra absolutely!
I tried to integrate
cargo-dist
into my release workflow and hit a roadblock in form of my required rustflags.In my cargo config I set a rustflag to compile the
uuid
crate with unstable features to be able to use UUIDv7.cargo-dist
's usage of the environment variable completely overwrites the cargo configuration though.Right now I'm resorting to allowing a dirty CI state and adding the
RUSTFLAGS
env-var with the appropriate value, sincecargo-dist
preserves those.I personally see two possible solutions to this:
cargo-dist
parses the cargo config and appends any rustflags to the environment variable it setscargo-dist
adds the ability to add arbitrary environment variablesBoth of these would be nice features tbh