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 status;
15pub mod types;
16
17pub use config::*;
18pub use error::*;
19pub use paths::{
20    config_dir, config_file, ensure_config_dir, ensure_state_dir, known_hosts_path, probe_id_path,
21    probe_key_path, probe_pubkey_path, read_probe_id, runtime_dir, set_runtime_dir, set_state_dir,
22    state_dir, status_socket_path, write_probe_id,
23};
24pub use types::*;
25
26/// Firmware version — must match the reference probe version for controller
27/// acceptance
28pub const FIRMWARE_VERSION: u32 = 5120;
29
30/// Version string
31pub const VERSION: &str = env!("CARGO_PKG_VERSION");