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 traceroute;
17pub mod types;
18
19pub use config::*;
20pub use error::*;
21pub use paths::{
22    config_dir, config_file, ensure_config_dir, ensure_state_dir, known_hosts_path,
23    paused_until_path, probe_id_path, probe_key_path, probe_pubkey_path, read_probe_id,
24    runtime_dir, set_runtime_dir, set_state_dir, state_dir, status_socket_path, write_probe_id,
25};
26pub use pause::{read_pause_state, write_pause_state, PauseState};
27pub use traceroute::{TracerouteOptions, TracerouteProtocol};
28pub use types::*;
29
30/// Firmware version: must match the reference probe version for controller
31/// acceptance. 5130 (2026-08-05): the measurement-visible changes are all in
32/// evntp (RFC 5905 offset in fixed point, `-g` gap between requests, "RIPE"
33/// reference id in network byte order), which Starla's NTP now follows.
34pub const FIRMWARE_VERSION: u32 = 5130;
35
36/// Version string
37pub const VERSION: &str = env!("CARGO_PKG_VERSION");