infinity_bridge_wire/lib.rs
1#![cfg_attr(not(feature = "std"), no_std)]
2
3extern crate alloc;
4
5mod error;
6mod msg;
7
8pub use error::{BridgeError, ErrorKind};
9pub use msg::{AckPayload, CmdPayload, EventPayload, HelloPayload, WireMsg};
10
11pub const PROTOCOL_VERSION: u32 = 1;
12
13/// Event name a relay emits (gauge → host) once its CommBus link is bound and
14/// it can actually reach the WASM module behind it — a socket being open only
15/// proves the *Coherent* half is alive.
16///
17/// The host consumes this rather than fanning it out to event subscribers, and
18/// prefers ready clients when dispatching commands. Relays predating this
19/// event never send it, so "no client has ever reported ready" must be treated
20/// as "readiness unknown", not as "nothing is reachable".
21pub const READY_EVENT: &str = "__bridge_ready";