feat(agent): add safe lowlevel extension point

This commit is contained in:
igor04091968
2026-06-04 13:08:07 +03:00
parent 313c49eb4e
commit 0341e114a9
5 changed files with 131 additions and 0 deletions
@@ -0,0 +1,18 @@
//! Safe low-level extension point for future agent optimizations.
//!
//! The default implementation is pure Rust. The `asm-lowlevel` feature is a
//! reserved integration point for future platform-specific CPU and timing
//! probes implemented through `core::arch`, inline assembly, or native OS
//! calls. Keep any future `unsafe` code isolated inside this module.
pub mod cpu;
pub mod timing;
pub use cpu::{CpuFeatures, get_cpu_features};
pub use timing::{high_precision_time_ns, monotonic_ticks};
#[cfg(feature = "asm-lowlevel")]
pub const LOWLEVEL_BACKEND: &str = "asm-lowlevel-ready-rust-fallback";
#[cfg(not(feature = "asm-lowlevel"))]
pub const LOWLEVEL_BACKEND: &str = "rust";