Skip to content

Official API for reading cargo env variables #12431

@epage

Description

@epage

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-cargo-apiArea: cargo-the-library API and internal code issuesC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions