pub const KTSTR_KERNEL_PARALLELISM_ENV: &str = "KTSTR_KERNEL_PARALLELISM";Expand description
Name of the environment variable that overrides the rayon
pool width used by cargo ktstr’s resolve_kernel_set to
fan out per-spec kernel resolves (download / git-clone /
build) in parallel. Default cap is available_parallelism()
— the host’s logical CPU count — chosen so download streams
do not outnumber threads the host can drive without
thrashing a contended local network (kernel.org CDN
per-IP throttle, developer ISP, CI shared NIC).
Operators override when the default is wrong for their
environment: a fast NIC + slow CPU benefits from raising
the cap above logical-CPU count to keep more downloads
in flight; a contended CI runner with concurrent jobs
benefits from lowering it to 1 or 2 to leave bandwidth
for siblings; a multi-version --kernel A..Z resolve on
a workstation may want a hand-tuned middle value to
balance throughput against background load.
Parsed as usize; 0 and unparseable values fall through
to the default cap so a typoed export does not silently
disable parallelism. Leading/trailing whitespace is trimmed
before parsing so a shell-quoted =" 8 " behaves the same
as the unquoted form. Read by
crate::cli::resolve_kernel_parallelism (the helper
that combines this env value with the
available_parallelism() fallback) so the parsing rules
live in one place.
Single source of truth so the name is not spelled by hand at each reader; if the name ever changes, the change lands in one place instead of fanning out to every call site.