astral-sh/uv
uv-dirs
crates/uv-dirs/ resolves uv's user-facing directories: cache directory, state directory,
config directory, executable install directory.
Purpose
uv obeys XDG on Linux, Apple's ~/Library/... conventions on macOS, and Windows'
%LOCALAPPDATA%. Every consumer goes through this crate so the rules are applied uniformly.
Key abstractions
user_cache_dir()—~/.cache/uv/%LOCALAPPDATA%\uv\cache.user_state_dir()—~/.local/share/uv.user_config_dir()—~/.config/uv.user_executable_directory()—~/.local/bin(with macOS/Windows variants).- Each function honors the matching
UV_*_DIRenv-var override.
See also
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.