Skip to main content

starla_common/
lib.rs

1//! Common types and utilities for Starla
2//!
3//! This crate provides shared functionality across all Starla components:
4//! - Core types (ProbeId, MeasurementId, etc.)
5//! - Configuration management
6//! - Path resolution (XDG/systemd)
7//! - Logging infrastructure
8//! - Error types
9
10pub mod config;
11pub mod error;
12pub mod logging;
13pub mod paths;
14pub mod pause;
15pub mod status;
16pub mod types;
17
18pub use config::*;
19pub use error::*;
20pub use paths::{
21    config_dir, config_file, ensure_config_dir, ensure_state_dir, known_hosts_path,
22    paused_until_path, probe_id_path, probe_key_path, probe_pubkey_path, read_probe_id,
23    runtime_dir, set_runtime_dir, set_state_dir, state_dir, status_socket_path, write_probe_id,
24};
25pub use pause::{read_pause_state, write_pause_state, PauseState};
26pub use types::*;
27
28/// Firmware version: must match the reference probe version for controller
29/// acceptance
30pub const FIRMWARE_VERSION: u32 = 5120;
31
32/// Version string
33pub const VERSION: &str = env!("CARGO_PKG_VERSION");