Skip to main content

zerodds_inspect_endpoint/
lib.rs

1//! ZeroDDS Inspect-Endpoint.
2//!
3//! Crate `zerodds-inspect-endpoint`. Safety classification: **STANDARD**.
4//! Debug-tool crate, fully `#[cfg(feature = "inspect")]`-gated and
5//! `#![forbid(unsafe_code)]`. In the release build (feature off) the
6//! entire tap mechanism is dropped (R-099, C-021).
7//!
8//! A hidden god-mode debug path (PDE spec R-097, C-020) for the
9//! external Reality Inspector (zerodds-pde). When the Cargo feature
10//! `inspect` is **off**, this crate exports **no** functions
11//! that touch the DDS hot path — the entire tap mechanism
12//! is `#[cfg(feature = "inspect")]`-gated and is dropped in the release build
13//! (R-099, C-021).
14//!
15//! ## Architecture
16//!
17//! - [`tap`] — trait + registry for tap hooks on DCPS/RTPS/transport.
18//! - [`frame`] — wire frame for the side channel.
19//! - [`auth`] — `cert.d` loader for X.509 PEM certs (R-100..R-104).
20//!
21//! ## Security invariants
22//!
23//! - **Ghost inject** (R-110): inject functions are separate API
24//!   paths; they publish directly into the DDS production data path,
25//!   **without** going through the tap hooks. As a result
26//!   production taps do NOT see the inject — old DDS stacks without security
27//!   would otherwise chicken out.
28//! - **Idle-branch elision**: tap-hook calls in dcps/rtps/transport
29//!   are hidden behind `#[cfg(feature = "inspect")]`. Without the
30//!   feature there is no branch in the hot path.
31
32#![cfg_attr(not(feature = "inspect"), allow(dead_code))]
33#![forbid(unsafe_code)]
34
35pub mod auth;
36pub mod frame;
37#[cfg(feature = "inspect")]
38pub mod server;
39pub mod tap;
40
41#[cfg(feature = "inspect")]
42pub use server::{BroadcastHook, InspectServer, ServerConfig};
43#[cfg(feature = "inspect")]
44pub use tap::{TapHook, register_dcps_tap, register_rtps_tap, register_transport_tap};
45
46pub use frame::{Frame, FrameKind};