Skip to main content

default_cache_dir

Function default_cache_dir 

Source
pub fn default_cache_dir() -> String
Expand description

Resolve the effective kernel cache directory.

Priority: $TEENYC_CACHE_DIR (if set) > <exe_dir>/../cache (if that directory exists — the layout cargo teeny package produces, with cache/ sitting next to bin/) > /tmp/teenyc_cache.

The exe-relative check only ever fires when a real cache/ directory is actually there, so plain cargo run/cargo test dev builds (whose exe lives under target/debug/..., with no cache/ sibling) are unaffected.