Skip to main content

Module config

Module config 

Source

Functions§

config_path
Phase D: location of the user’s optional config file. We use dirs::config_dir() rather than data_dir() so this lives in the platform-appropriate “preferences” directory (macOS ~/Library/Application Support, Linux ~/.config, Windows %APPDATA%). Doesn’t have to exist — load_relays returns an empty list if absent.
data_dir
db_path
ensure_data_dir
identity_key_path
load_relays
Phase D: parse the [network] relays = [...] list from the config file. Tiny hand-rolled parser — we don’t want a toml crate dep just for this. Lines starting with # are comments; whitespace is trimmed. Returns an empty Vec if the file doesn’t exist or has no relays entry.
log_path