Environment Variables

Core

VariableDefaultDescription
CARGO_SLICER_VIRTUALunsetSet to 1 to enable virtual slicing
CARGO_SLICER_CODEGEN_FILTERunsetSet to 1 to skip CGUs containing only stubs
RUSTC_WRAPPERunsetSet to path of cargo_slicer_dispatch
CARGO_SLICER_DRIVERunsetSet to path of cargo-slicer-rustc

Cross-crate analysis

VariableDefaultDescription
CARGO_SLICER_CROSS_CRATEunsetSet to 1 to enable cross-crate analysis
CARGO_SLICER_PARSERsynPre-analysis backend: syn, fast, or ctags

MIR-precise analysis

VariableDefaultDescription
CARGO_SLICER_MIR_PRECISEunsetSet to 1 for MIR-level whole-program analysis
CARGO_SLICER_WORKSPACE_CRATESunsetComma-separated list of workspace crates to harvest

Performance tuning

VariableDefaultDescription
CARGO_SLICER_SKIP_THRESHOLDautoSkip driver when predicted stubs < threshold. auto = skip 0-stub crates; 0/never = never skip
CARGO_SLICER_DAEMONunsetSet to 1 to enable fork-server (amortises 300 ms driver load)
CARGO_SLICER_SCCACHEautoPath to sccache, or /nonexistent to disable
CARGO_SLICER_RELAX_UNSAFEunsetSet to 1 to allow stubbing unsafe fn

Caching

VariableDefaultDescription
CARGO_SLICER_CACHE_DIR.slicer-cacheDirectory for incremental cache files
CARGO_SLICER_NO_CACHEunsetSet to 1 to disable caching entirely

Debugging

VariableDefaultDescription
CARGO_SLICER_DEBUGunsetSet to 1 to enable debug logging
CARGO_SLICER_DEBUG_LOG.cargo-slicer-debug.logCustom path for debug log
CARGO_SLICER_MARKED_OUTunsetWrite marked items to a file for inspection