Skip to main content

Module paths

Module paths 

Source
Expand description

Cache/config path resolution and the per-repo cache layout.

Note the deliberate macOS asymmetry (spec §7): the cache follows the platform convention (~/Library/Caches on macOS, $XDG_CACHE_HOME on Linux/WSL), but the config is XDG-style (~/.config) on all platforms — never ~/Library/Application Support.

Structs§

CacheLayout
<cache>/dejavu/<repo_hash>/ and everything under it.

Functions§

cache_root
<cache>/dejavu — the root under which every repo gets a <repo_hash> dir. macOS: ~/Library/Caches/dejavu. Linux/WSL: $XDG_CACHE_HOME/dejavu then ~/.cache/dejavu. dirs::cache_dir() already encodes this platform matrix.
config_file_path
Global config file: $XDG_CONFIG_HOME/dejavu/config.toml, else ~/.config/dejavu/config.toml — XDG on every platform.
global_shims_bin
The repo-independent shim dir used by global activation (dejavu shellenv): <cache_root>/shims/bin. Never collides with per-repo caches (<cache_root>/<16-hex-hash>/).
repo_hash
Stable 16-hex-char id for a repo, derived from its canonicalized absolute path (symlinks resolved so two paths to the same repo collide correctly).