Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Environment variables

A central reference for every env var aozora reads. Variables fall into three groups: parser configuration, dev / bench harness, and container plumbing.

Parser configuration

VariableRead byEffect
NO_COLORaozora-cliIf set (any value), disable ANSI colour output. Same as --no-color. Standard convention from https://no-color.org.
AOZORA_LOGaozora-cli, library opt-intracing-subscriber filter directive (e.g. aozora_pipeline=debug,aozora_render=info). For internal debugging; not part of the stable surface.

Dev / bench harness

VariableRead byEffect
AOZORA_CORPUS_ROOTaozora-corpus, every probe, every sample-profile recipe, the corpus sweepDirectory of 青空文庫 source files (UTF-8 or Shift_JIS). Required for any corpus-driven operation.
AOZORA_PROFILE_LIMITaozora-bench probesCap the number of corpus documents per probe. Useful for fast iteration; set to 100 for a sub-second sweep.
AOZORA_PROFILE_REPEATsamply-corpus, samply-renderNumber of parse / render passes per document after the one-time corpus load. Default 5; raise to give samply enough parser-bound wall time to attach to.
AOZORA_PROBE_DOCpathological_probeSingle corpus path to probe in tight per-call mode. Path is relative to $AOZORA_CORPUS_ROOT.
AOZORA_PROPTEST_CASESaozora-proptest::configOverride default proptest case count (default 128 per block). 4096 for just prop-deep.

Container plumbing

These are set by docker-compose.yml and don’t need manual handling unless you’re invoking cargo directly outside the dev container.

VariableSet byPurpose
CARGO_HOMEcompose/workspace/.cargo — registry + git deps cached on a named volume.
CARGO_TARGET_DIRcompose/workspace/target — build output cached on a named volume.
RUSTC_WRAPPERcomposesccache — compile cache.
SCCACHE_DIRcompose/workspace/.sccache — sccache backing store on a named volume.
SCCACHE_CACHE_SIZEcompose10G — default cap.
CARGO_INCREMENTALcompose0 — incremental compile defeats sccache; turning it off lets sccache cache the very crates we build most often.
RUST_BACKTRACEcompose1 — full backtraces on panic.
GIT_CONFIG_*composeWhitelists /workspace for git’s “dubious ownership” check (the bind-mounted host source is a non-root UID; the container runs as root).

Variables we deliberately do not read

A few standard variables aozora intentionally ignores:

VariableWhy ignored
LANG / LC_ALLaozora handles its own encoding via --encoding. Locale-driven byte interpretation would make the parser non-reproducible across machines.
RUSTFLAGS (in non-build context)The release / bench / PGO profiles set their own flags; per-invocation RUSTFLAGS would defeat sccache hits for unrelated crates.
CARGO_BUILD_JOBSCargo’s default (CPU count) is what we want. Overriding usually fights the bench harness’s own parallelism control.

See also