Skip to main content

gglib_core/paths/
mod.rs

1#![doc = include_str!("README.md")]
2mod config;
3mod database;
4mod ensure;
5mod error;
6mod llama;
7mod models;
8mod pids;
9mod platform;
10mod resolver;
11mod slots;
12
13#[cfg(test)]
14mod test_utils;
15
16// Re-export public API
17
18// Error type
19pub use error::PathError;
20
21// Platform detection and roots
22pub use platform::{data_root, is_prebuilt_binary, resource_root};
23
24// Database
25pub use database::database_path;
26
27// Llama binaries
28pub use llama::{
29    gglib_data_dir, llama_bench_path, llama_config_path, llama_cpp_dir, llama_server_path,
30};
31
32// Models directory
33#[cfg(not(target_os = "windows"))]
34pub use models::DEFAULT_MODELS_DIR_RELATIVE;
35pub use models::{ModelsDirResolution, ModelsDirSource, default_models_dir, resolve_models_dir};
36
37// PID tracking
38pub use pids::pids_dir;
39
40// Directory operations
41pub use ensure::{DirectoryCreationStrategy, ensure_directory, verify_writable};
42
43// Configuration persistence
44pub use config::{env_file_path, persist_env_value, persist_models_dir};
45
46// Pure resolver for testing and CLI
47pub use resolver::ResolvedPaths;
48
49// Slot cache paths
50pub use slots::{
51    slot_bin_path, slot_file_name, slot_model_prefix, slot_session_from_stem, slot_tmp_file_name,
52};