indexbus_platform_ops/
lib.rs

1//! `indexbus-platform-ops` provides platform-/OS-specific operational helpers.
2//!
3//! Scope (examples):
4//! - CPU affinity inspection + pinning
5//! - Memory locking helpers (`mlockall`)
6//! - Host preflight checks (THP, governor, memlock, hugetlbfs, irqbalance)
7//!
8//! Non-goals:
9//! - Defining application policy (env var names, defaults, printing/UX)
10
11#![cfg_attr(not(feature = "std"), no_std)]
12#![deny(missing_docs)]
13
14#[cfg(all(not(feature = "std"), not(doc)))]
15compile_error!("indexbus-platform-ops currently requires the `std` feature");
16
17#[cfg(feature = "std")]
18extern crate std;
19
20/// Error types and `Result` aliases.
21pub mod errors;
22
23#[cfg(feature = "std")]
24/// CPU-related operational helpers (affinity probing/pinning).
25pub mod cpu;
26
27#[cfg(feature = "std")]
28/// Memory-related operational helpers (e.g. `mlockall`).
29pub mod memory;
30
31#[cfg(feature = "std")]
32/// Time-related operational helpers.
33pub mod time;
34
35#[cfg(feature = "std")]
36/// Process-related operational helpers (PID liveness, signals).
37pub mod process;
38
39#[cfg(all(feature = "std", target_os = "linux"))]
40/// Linux-specific operational helpers.
41pub mod linux;