1#![deny(missing_docs, unsafe_op_in_unsafe_fn, rust_2018_idioms)]
2#![forbid(clippy::dbg_macro, clippy::print_stdout)]
3#![allow(unsafe_code)]
8
9#[cfg(all(feature = "prometheus-exporter", feature = "compile-time-config"))]
25compile_error!(
26 "`prometheus-exporter` cannot be combined with `compile-time-config` \
27 — Class-A safety-critical builds intentionally have no /metrics \
28 surface. See book/src/architecture/safety-profiles.md for the supported \
29 feature matrix."
30);
31
32#[cfg(all(feature = "libc-signal-mode", feature = "compile-time-config"))]
33compile_error!(
34 "`libc-signal-mode` cannot be combined with `compile-time-config` \
35 — Class-A safety-critical builds intentionally retain end-to-end \
36 kernel-ABI ownership via the inline-asm signal-return trampoline. \
37 See book/src/architecture/signal-install.md for the supported \
38 feature matrix."
39);
40
41#[cfg(all(feature = "unsafe-plaintext-udp", feature = "compile-time-config"))]
42compile_error!(
43 "`unsafe-plaintext-udp` cannot be combined with `compile-time-config` \
44 — plaintext UDP has no per-datagram authentication or replay \
45 protection, so a network attacker can suppress stall detection by \
46 forging beats. Class-A safety-critical (mission-critical) builds \
47 must use `secure-udp` for any UDP transport. See \
48 book/src/architecture/safety-profiles.md for the supported feature \
49 matrix."
50);
51
52pub mod audit;
53pub mod clock;
54pub mod config;
55pub mod exporter;
56pub mod hw_watchdog;
57pub mod listener;
58pub mod log;
59pub mod log_ratelimit;
60mod nonblock_fd;
61pub mod notify;
62pub mod observer;
63pub mod peer_cred;
64pub mod pid_max;
65pub mod signal_install;
66#[cfg(all(feature = "prometheus-exporter", not(feature = "fuzzing")))]
71mod ip_state_table;
72#[cfg(not(feature = "fuzzing"))]
73mod outstanding_table;
74#[cfg(not(feature = "fuzzing"))]
75mod probe_table;
76pub mod recovery;
77
78#[cfg(feature = "fuzzing")]
79#[path = "ip_state_table.rs"]
80pub mod ip_state_table;
81#[cfg(feature = "fuzzing")]
82#[path = "outstanding_table.rs"]
83pub mod outstanding_table;
84#[cfg(feature = "fuzzing")]
85#[path = "probe_table.rs"]
86pub mod probe_table;
87
88#[cfg(feature = "fuzzing")]
90pub mod __fuzz_internals {
91 pub use crate::ip_state_table;
92 pub use crate::outstanding_table;
93 pub use crate::probe_table;
94}
95
96#[cfg(all(any(test, feature = "test-hooks"), not(feature = "libc-signal-mode")))]
103#[doc(hidden)]
104pub mod __test_signal_abi {
105 #[cfg(target_os = "linux")]
106 pub use crate::signal_install::linux::test_abi::*;
107}
108pub mod tracker;
109
110#[cfg(feature = "secure-udp")]
111pub mod secure_listener;
112
113pub use clock::{Clock, ClockError, ClockSource};
114pub use config::{Config, ConfigError};
115#[cfg(feature = "prometheus-exporter")]
116pub use exporter::PromExporter;
117pub use exporter::{Exporter, FileExporter};
118pub use listener::{BeatListener, PreThreadAttestation, TransportTrust, UdsListener};
119pub use observer::{Event, Observer};
120pub use peer_cred::BeatOrigin;
121pub use recovery::{Recovery, RecoveryOutcome};
122pub use tracker::{EvictionPolicy, Slot, Tracker, Update};
123
124#[cfg(feature = "unsafe-plaintext-udp")]
125pub use listener::UdpListener;
126
127#[cfg(feature = "secure-udp")]
128pub use secure_listener::SecureUdpListener;