Skip to main content

Module platform

Module platform 

Source
Expand description

The variables running-process-platform-internal declares and reads, including the ones this crate reads too. See all_declared for the combined inventory. Every environment variable this crate reads in production, declared in one place (#1101).

crate::env is the mechanism; this is the policy for running-process-platform-internal. Each reader goes through one of these constants rather than a string literal, so an embedder can learn what the crate reads from DECLARED_PLATFORM instead of grepping call sites.

Many of these are read with EnvVar::os rather than EnvVar::path: the original readers treated VAR= (empty) as set, and moving them onto a table is not a reason to change what they do.

§One owner per name

Some of these are also read by running-process. Each name is declared once, here, by the lowest crate that reads it; running_process::env_vars refers to the same constant rather than repeating it, and its all_declared() is the one combined inventory. The shared declarations keep the wording running_process::env_vars::DECLARED has always published, so that table did not change when they moved.

Not covered, deliberately:

  • Reads keyed by a caller-supplied name (ipc descriptor keys on Linux and macOS). The name is data there, not a variable this crate chooses, so there is nothing to declare; they go through os_named.
  • Save/restore and fixture plumbing inside #[cfg(test)] code.

Constants§

APE_CACHE_DIR
Preferred directory for loaders extracted from APE images; used only when private and exec-capable.
APE_LOADER
Explicit loader (an ape binary or a POSIX shell) for APE images.
COMPUTERNAME
Windows machine name, reported as the host name.
CONPTY_CACHE
Root under which the ConPTY sidecar is cached on Windows.
CONPTY_DIAGNOSTICS
Print how the ConPTY implementation was chosen and fetched, to stderr.
CONPTY_OFFLINE
Forbid fetching the ConPTY sidecar over the network.
CONPTY_SIDECAR_FETCH_TIMEOUT_MS
Upper bound on the ConPTY sidecar download, in milliseconds.
DECLARED_PLATFORM
Every environment variable this crate reads in production, sorted by name; declarations_are_sorted_unique_and_documented holds that.
DISPLAY
X11 display; its presence is what makes a Linux window icon possible.
HOME
Home directory; roots the autostart entries and the fallback APE loader cache directory.
KILL_DRAIN_TIMEOUT_MS
How long kill() waits for output capture to drain, in milliseconds.
LOCALAPPDATA
Windows per-user application data root.
NATIVE_TERMINAL_INPUT_TRACE_PATH
Where Windows native terminal input events are traced.
PATH
Executable search path, forwarded to the symbolization worker and searched for an APE image or loader.
TMPDIR
macOS per-session temporary directory; a broker endpoint root.
USE_SYSTEM_CONPTY
Use the system ConPTY instead of the bundled sidecar on Windows.
WAYLAND_DISPLAY
Wayland session marker; window icons are unsupported under Wayland.
WINDOWID
X11 window id exported by the terminal emulator.
WT_SESSION
Windows Terminal session marker; runtime window icons are degraded there.
XDG_CACHE_HOME
XDG per-user cache root; where extracted APE loaders are installed.
XDG_CONFIG_HOME
XDG per-user configuration root; where service definitions are read.
XDG_DATA_HOME
XDG per-user data root, used by the daemon runtime collector.
XDG_RUNTIME_DIR
XDG per-user runtime root; where broker sockets and fallback APE loaders are placed.
XDG_STATE_HOME
XDG state root.