Library

std/env

Process environment access.

1 file lib/std/env/env.vader 1 exports

MVP scope: a single read-only lookup of a process environment variable. Kept separate from std/tty (its first caller) because environment access is a general capability, not a terminal concern.

getenv itself. Reading the build machine's environment during comptime evaluation bakes a non-reproducible value, so callers must not do it from a @comptime context; nothing refuses the call, and bootstrap/verify.sh catches it in this tree.

Functions

get_env :: fn(name: string) -> string | null

The value of environment variable name, or null when it is unset.

Parameters

namestring the variable name, e.g. "NO_COLOR" or "PATH".

Returns

string | null the variable's value, or null if it is not present in the environment. An empty value is returned as "", distinct from null (unset).
Written by vader doc. Icons: Codicons, CC BY 4.0. Fonts: Atkinson Hyperlegible, JetBrains Mono, OFL.