docs: document all environment variables read by the crate - #62
Conversation
Add docs/environment-variables.md: an exhaustive, audited list of every environment variable the crate reads, grouped by who reads it. The only runtime knob that affects the production library is PRMI_ISA (presence-only; enables the byte-identity-safe ISA reseed fast-path in the fused SMEM collector when a .isa sidecar is present, read once per process via OnceLock). Every other PRMI_*/FIX_* variable is read solely by the benchmark, example, and fixture-generator binaries under examples/, benches/, and prmi-sys/examples/, and has no effect on a linked consumer. CARGO_* and OUT_DIR are standard Cargo build-script variables. Also note the consumer-side name collision: bwa-mem3's PRMI_ZIGZAG_ISA is a separate consumer-only variable; PRMI_ISA is what toggles this library's ISA reseed on the consumer's default fused path. Link the new page from the README.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughAdds Environment Variable Documentation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
Adds
docs/environment-variables.md— an exhaustive, audited list of every environment variable the crate reads, grouped by who reads it, with accepted values, defaults, and effects. Links it from the README.The audit (every
env::var/env::var_os/option_env!/env!site across the crate, sub-crates, examples, benches, and tests) found:PRMI_ISA. Presence-only; enables the byte-identity-safe ISA reseed fast-path in the fused SMEM collector (collect_smems) when a.isasidecar is present. Read once per process viaOnceLock, so it is not on any per-read hot path. Cuts per-reseed SA probes from ~10–20 (cold model launch) to ~1–2 (confirm-only warm start).PRMI_*/FIX_*variables are read solely by the benchmark, example, and fixture-generator binaries underexamples/,benches/, andprmi-sys/examples/— they have no effect on a linked consumer.CARGO_MANIFEST_DIR,OUT_DIR,CARGO_PKG_VERSIONare standard Cargo build-script variables, listed for completeness.The doc also calls out a naming collision that has caused confusion: the bwa-mem3 consumer's
PRMI_ZIGZAG_ISAis a separate, consumer-only variable affecting the consumer's non-fused 'zigzag' finder; to enable this library's ISA reseed on the consumer's default fused path you setPRMI_ISAin the process environment.Notes
PRMI_ISAread site incollect.rswas already documented in code; this PR centralizes the full list.Summary by CodeRabbit
PRMI_ISAvariable, including its behavior and default handling.