std::env)Open and answer this issue on GitHub.
decision · opened 2026-10-18 · updated 2026-10-18 · 0 comments
A program cannot read GITHUB_TOKEN or any other environment variable. std::cli::args() gives the arguments; the only way to the environment is a foreign declaration of getenv (crates/nikaia-std/src/lib.rs, the note near line 605).
The Nikaia prototype of scripts/site-issues.py: it takes an optional token from GITHUB_TOKEN/GH_TOKEN. std has no way to write that line.
Does std get env::var(name) -> String? (absent is null, as the contracts text already says about getenv), and is reading the environment a capability like fs::Root, passed in, or an ordinary call? Every common language offers this.
std::env::var, std::env::vars.