Guide/In production
Environment Variables
1 min readFrom the README
Standard Rust / Python build-time and runtime variables that are useful when working with FrankenNetworkX:
| Variable | Effect |
|---|---|
CARGO_TARGET_DIR=... |
Standard cargo override; useful for sharing the target directory between local and CI builds. Speeds up incremental rebuilds dramatically when building from source repeatedly. |
RUSTFLAGS="-C target-cpu=native" |
Build a wheel tuned for the current CPU. Meaningful for the numpy/scipy-adjacent paths and any SIMD-friendly inner loop. Don't use for distributable wheels. |
PYO3_PYTHON=/path/to/python |
Build against a specific Python interpreter. Useful for multi-venv setups. |
MATURIN_PEP517_ARGS=--release --features pyo3/abi3-py310 |
Force a release build when pip install from source. |
The library reads no FNX_* environment variables at runtime (the test and benchmark harnesses have their own, e.g. FNX_TEST_MAX_RSS_MB). The compatibility mode is configured in-process: fnx.config.compatibility_mode / fnx.set_compatibility_mode(...) (process-wide), fnx.compatibility_mode(...) (thread-local context), or a reader's mode= keyword.