runbound 0.3.1

RFC-compliant DNS recursive resolver — drop-in replacement for Unbound, with integrated REST API
1
2
3
4
5
6
7
8
9
10
11
// Global runtime state initialized once at startup.
// BASE_DIR is derived from the config file's parent directory.

use std::path::{Path, PathBuf};
use std::sync::OnceLock;

pub static BASE_DIR: OnceLock<PathBuf> = OnceLock::new();

pub fn base_dir() -> &'static Path {
    BASE_DIR.get().expect("BASE_DIR not initialized before use")
}