axodotdev / axodotdev/cargo-dist

`RUSTFLAGS` via cargo config

Open
#513 5 comments 5 reactions 0 assignees View on GitHub
feature request
Dominant language
Rust
Stars
2.1k
Forks
149
Avg merge
1d 11h
Merged PRs (30d)
32

Description

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, since `cargo-dist` preserves those.

---

I personally see two possible solutions to this:

1. `cargo-dist` parses the cargo config and appends any rustflags to the environment variable it sets
2. `cargo-dist` adds the ability to add arbitrary environment variables

Both of these would be nice features tbh

Contributor guide

Open the contributing guide

Research direction

Start by tracing where cargo-dist sets RUSTFLAGS during its release workflow. Compare preserving cargo-config rustflags with supporting arbitrary environment variables, then define completion as allowing the required rustflags to survive without a dirty CI workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, release
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.