rvcsi_core/lib.rs
1//! # rvCSI core
2//!
3//! Foundation types for the rvCSI edge RF sensing runtime (ADR-095, ADR-096).
4//!
5//! Every CSI source is normalized into a [`CsiFrame`]; bounded sequences of
6//! frames become a [`CsiWindow`]; semantic interpretations become a
7//! [`CsiEvent`]. A [`CsiSource`] is the plugin trait every hardware/file/replay
8//! adapter implements. Nothing crosses a language boundary (napi-rs / napi-c)
9//! until [`validate_frame`] has run and the frame's [`ValidationStatus`] is
10//! `Accepted` or `Degraded`.
11//!
12//! This crate is dependency-light (serde + thiserror only) and `no_std`-clean
13//! in spirit so it can be reused from WASM later.
14
15#![forbid(unsafe_code)]
16#![warn(missing_docs)]
17
18mod adapter;
19mod error;
20mod event;
21mod frame;
22mod ids;
23mod validation;
24mod window;
25
26pub use adapter::{AdapterKind, AdapterProfile, CsiSource, SourceConfig, SourceHealth};
27pub use error::RvcsiError;
28pub use event::{CsiEvent, CsiEventKind};
29pub use frame::{CsiFrame, ValidationStatus};
30pub use ids::{EventId, FrameId, IdGenerator, SessionId, SourceId, WindowId};
31pub use validation::{validate_frame, QualityScore, ValidationError, ValidationPolicy};
32pub use window::CsiWindow;
33
34/// Re-exported result type for the runtime.
35pub type Result<T> = core::result::Result<T, RvcsiError>;