Skip to content

Official API for reading cargo env variables #12431

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
epage opened this issue Aug 1, 2023 · 0 comments
Open

Official API for reading cargo env variables #12431

epage opened this issue Aug 1, 2023 · 0 comments
Labels
A-cargo-api Area: cargo-the-library API and internal code issues C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-needs-team-input Status: Needs input from team on whether/how to proceed.

Comments

@epage
Copy link
Contributor

epage commented Aug 1, 2023

Problem

Having a Rust API would help with several problems

  • Parsing multi-values env variables, like author
  • Avoid people making type mistakes
  • Bring documentation more inline with people's workflow, e.g. IDEs auto-completing and rendering doc comments
  • Help improve discoverability of fields
  • Ensures a feedback loop with the cargo team, hoping it avoids some of the failure modes where compatibiluty is broken
  • Reduce duplicated effort

Proposed Solution

A crate that provides macros for various compile-time env variables set by cargo

Notes

Things to work out

@epage epage added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` A-cargo-api Area: cargo-the-library API and internal code issues S-triage Status: This issue is waiting on initial triage. labels Aug 1, 2023
@ehuss ehuss added S-needs-team-input Status: Needs input from team on whether/how to proceed. and removed S-triage Status: This issue is waiting on initial triage. labels Sep 25, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-cargo-api Area: cargo-the-library API and internal code issues C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-needs-team-input Status: Needs input from team on whether/how to proceed.
Projects
None yet
Development

No branches or pull requests

2 participants