Skip to main content

Crate oxide_mesh

Crate oxide_mesh 

Source
Expand description

§oxide-mesh — Inter-Agent Communication

Lightweight, transport-agnostic peer-to-peer fabric for Rust Oxide agents. Two transports ship today:

  • local — in-process tokio::sync::mpsc channels. Used by tests and embedded multi-agent setups where every peer shares the same Tokio runtime.
  • tcp — JSON-line framed TCP. Used for cross-process / cross-host peers. The wire format is one PeerMessage per line, so it inter- operates with hand-rolled clients (netcat for debugging is fine).

The protocol is intentionally small — five message kinds — and is deliberately not libp2p. Future federated-learning work will pile gossip and CRDT primitives on top of this base layer rather than adopting a whole networking stack.

MeshModule exposes the mesh on the oxide-k bus so agents can send broadcasts, direct messages, and task assignments through standard kernel plumbing.

Re-exports§

pub use bus_bridge::BusBridge;
pub use crdt::GSet;
pub use crdt::LwwRegister;
pub use crdt::PnCounter;
pub use error::MeshError;
pub use error::Result;
pub use kernel::MeshModule;
pub use local::LocalMesh;
pub use local::MeshHandle;
pub use local::PeerHandle;
pub use message::PeerCapability;
pub use message::PeerId;
pub use message::PeerMessage;
pub use tcp::TcpMesh;

Modules§

bus_bridge
Bus Bridge — bus-over-TLS for cross-process kernels (R-21)
crdt
Tiny CRDT primitives for federated state.
error
Error type.
kernel
oxide-k integration: expose the mesh on the kernel bus.
local
In-process mesh built on tokio::sync::mpsc channels.
message
Wire protocol types.
tcp
JSON-line framed TCP transport — plain and TLS.