Skip to main content

irontide_engine_support/
lib.rs

1//! Engine support primitives for irontide.
2//!
3//! This is the thin leaf crate that sits **below** both the engine runtime
4//! (`irontide-engine`) and `irontide-session`. It owns the pure, low-coupling
5//! mechanisms that both layers consume downward:
6//!
7//! - [`error`] — the crate-wide [`Error`]/[`Result`] type (`#[from]`-wraps the
8//!   lower-crate errors plus [`i2p::SamError`]).
9//! - [`i2p`] — the I2P SAM-bridge client (co-located with `error` because
10//!   `Error` `#[from]`-wraps `i2p::SamError`).
11//! - [`transport`] — the network transport abstraction (`BoxedStream`,
12//!   `NetworkFactory`, `TransportListener`).
13//! - [`rate_limiter`] — the mixed-mode (GCRA) rate limiter.
14//! - [`slot_tuner`] — adaptive unchoke-slot tuning.
15//! - [`stats`] — the engine stats accumulator.
16//!
17//! Extracted from `irontide-session` at M244b (the engine/session split). The
18//! grounding verified these six modules are pure leaves — the only intra-crate
19//! edge is `error -> i2p` (`Error #[from] i2p::SamError`), which is why the two
20//! co-locate here. Every other module has zero `crate::` coupling.
21
22pub mod error;
23pub mod i2p;
24pub mod rate_limiter;
25pub mod slot_tuner;
26pub mod stats;
27pub mod transport;
28
29pub use error::{Error, Result};