rust-lang / rust-lang/cargo

Environment variable for the Rust version

Open
#4,408 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-environment-variables C-enhancement S-needs-rfc
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

Cargo sets some environment variables, for example, CARGO_PKG_VERSION. I suppose it will be handy to have environment variable with the Rust version.

I would like to try to add it if it is appropriate.

See also #2903

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Cargo's environment-variable handling and the linked Cargo environment-variable documentation, then read issue #2903 for related context. Determine the expected Rust-version variable and where Cargo should expose it; done means the behavior is agreed and implemented with appropriate verification.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, tooling
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.