mirror of
https://github.com/ruvnet/RuView
synced 2026-07-28 18:21:42 +00:00
1e684cb208
First implementation milestone for the rvCSI edge RF sensing runtime:
- rvcsi-core — the foundation: CsiFrame/CsiWindow/CsiEvent normalized schema,
ValidationStatus, AdapterProfile, CsiSource plugin trait, id newtypes +
IdGenerator, RvcsiError, and the validate_frame pipeline (length/finiteness/
subcarrier/RSSI/monotonicity hard checks + multiplicative quality scoring →
Accepted/Degraded/Recovered/Rejected). 29 unit tests, forbid(unsafe_code).
- rvcsi-adapter-nexmon — the napi-c boundary: native/rvcsi_nexmon_shim.{c,h}
(the only C in the runtime, allocation-free, bounds-checked, parses/writes a
byte-defined "rvCSI Nexmon record" — a normalized superset of the nexmon_csi
UDP payload), compiled via build.rs + cc, wrapped by a documented ffi module
and a NexmonAdapter implementing CsiSource. 9 tests round-tripping through C.
- Workspace registration in v2/Cargo.toml (8 new members + napi/cc workspace
deps) and compiling skeletons for rvcsi-dsp, rvcsi-events, rvcsi-adapter-file,
rvcsi-ruvector, rvcsi-node (napi-rs cdylib + build.rs napi_build::setup) and
rvcsi-cli (`rvcsi` binary) — to be filled in by the implementation swarm.
cargo build -p rvcsi-core -p rvcsi-adapter-nexmon -p rvcsi-node -p rvcsi-cli: OK
cargo test -p rvcsi-core -p rvcsi-adapter-nexmon: 38 passed, 0 failed
https://claude.ai/code/session_01CdYAPvRTjcch6YrYf42n1z
36 lines
1.2 KiB
Rust
36 lines
1.2 KiB
Rust
//! # rvCSI core
|
|
//!
|
|
//! Foundation types for the rvCSI edge RF sensing runtime (ADR-095, ADR-096).
|
|
//!
|
|
//! Every CSI source is normalized into a [`CsiFrame`]; bounded sequences of
|
|
//! frames become a [`CsiWindow`]; semantic interpretations become a
|
|
//! [`CsiEvent`]. A [`CsiSource`] is the plugin trait every hardware/file/replay
|
|
//! adapter implements. Nothing crosses a language boundary (napi-rs / napi-c)
|
|
//! until [`validate_frame`] has run and the frame's [`ValidationStatus`] is
|
|
//! `Accepted` or `Degraded`.
|
|
//!
|
|
//! This crate is dependency-light (serde + thiserror only) and `no_std`-clean
|
|
//! in spirit so it can be reused from WASM later.
|
|
|
|
#![forbid(unsafe_code)]
|
|
#![warn(missing_docs)]
|
|
|
|
mod adapter;
|
|
mod error;
|
|
mod event;
|
|
mod frame;
|
|
mod ids;
|
|
mod validation;
|
|
mod window;
|
|
|
|
pub use adapter::{AdapterKind, AdapterProfile, CsiSource, SourceConfig, SourceHealth};
|
|
pub use error::RvcsiError;
|
|
pub use event::{CsiEvent, CsiEventKind};
|
|
pub use frame::{CsiFrame, ValidationStatus};
|
|
pub use ids::{EventId, FrameId, IdGenerator, SessionId, SourceId, WindowId};
|
|
pub use validation::{validate_frame, QualityScore, ValidationError, ValidationPolicy};
|
|
pub use window::CsiWindow;
|
|
|
|
/// Re-exported result type for the runtime.
|
|
pub type Result<T> = core::result::Result<T, RvcsiError>;
|