Skip to content

Allow setting Cargo flags (e.g., -Zbuild-std) per profile #15053

Open
@ProgrammedInsanity

Description

@ProgrammedInsanity

Problem

It would be great if we could specify flags like -Zbuild-std for individual profiles in Cargo.toml, instead of creating aliases or global config. This would provide more flexibility, especially when specific configurations are needed for development or release builds. It would also eliminate the need for different aliases for building, running, benchmarks, and tests, allowing us to simply specify --profile .....

Proposed Solution

Example

[profile.release]
cargoflags = [" -Zbuild-std"]

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-profilesArea: profilesA-unstableArea: nightly unstable supportC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions