You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This page documents every environment variable the crate reads. It is exhaustive
as of the audit date below — if you add a new env::var/env::var_os/option_env!
read, document it here in the same release.
There is exactly one runtime knob that affects the production library
(PRMI_ISA). Everything else is read only by the benchmark/example/test harnesses
under prmi/examples/, prmi/benches/, and prmi-sys/examples/, or is a standard
Cargo build-script variable. Consumers linking libprmi_sys only ever need to care
about PRMI_ISA.
Runtime (production library)
PRMI_ISA
Read at:prmi/src/index/collect.rs (isa_reseed_enabled(), cached once per
process via OnceLock).
Values: presence-only. Set to any non-empty value to enable; unset/absent to
disable. The value is not inspected — PRMI_ISA=1, PRMI_ISA=on, and
PRMI_ISA=anything are equivalent.
Default: disabled (unset).
Effect: enables the ISA reseed fast-path inside the fused per-read SMEM
collector (collect_smems / collect_smems_into). When enabled and a .isa
sidecar is loaded and no k-mer table is present, reseeded pass-1 SMEMs resolve
their forward search with mem_search_warmstart, seeding the search from an
SA-index hint computed by isa_at(refpos + offset). This skips the learned-model
launch and boundary gallop, cutting per-reseed SA probes from ~10–20 (cold model
launch) down to ~1–2 (a confirm-only insertion search). If the .isa sidecar is
absent the flag has no effect (the fast-path requires it).
Correctness:byte-identity-safe. The hint is only a starting point for a
confirming search, so it produces the same (k, l, s) SA interval as a cold launch
for any occurrence; it cannot change which seeds are emitted.
Performance: read once per process (cached in a OnceLock), so it is not on
any per-read or per-call hot path. Build the sidecar with --with-isa (or the
equivalent isa build flag) to produce the .isa file this path consumes.
Note on the consumer-side name collision: the bwa-mem3 consumer also has a
variable called PRMI_ZIGZAG_ISA. That is a different variable that lives in
the consumer's own C++ code and only affects the consumer's (non-fused) "zigzag"
finder. To turn on this library's ISA reseed on the consumer's default fused
path, set PRMI_ISA in the process environment — the consumer's FFI calls run
in the same process, so this library reads it directly.
Build-script / compile-time (set automatically by Cargo)
These are not user knobs; Cargo populates them. Listed for completeness.
Variable
Read at
Purpose
CARGO_MANIFEST_DIR
prmi-sys/build.rs
Locate cbindgen.toml for FFI header generation.
OUT_DIR
prmi-sys/build.rs
Output directory for the generated prmi.h.
CARGO_PKG_VERSION
prmi/src/train/mod.rs (via env!)
Embedded as the sidecar trainer_version (prmi=<version>).
Development harnesses only (examples/, benches/, tests/)
None of these are read by the library or the FFI surface. They configure the
standalone benchmark/fixture binaries and have no effect on a linked consumer. Unless
noted, integers parse with .parse() and fall back to the default on a missing or
unparsable value.