Weave
06 · Transport

weave-swarm

Topic-based peer networking with priority events, real connection lifecycle, metrics, and an encrypted-stream backbone (weave-secret-stream). Built to pair with weave-proto-mp for typed multiplexed protocols.

Concepts
  • 01Connect peers, join topics, move signed payloads.
  • 02Encrypted streams via weave-secret-stream.
  • 03Priority events, real connection lifecycle, metrics.
  • 04Pairs with weave-proto-mp for typed multiplexed protocols.
Code
use weave_swarm::{Swarm, JoinOpts};

let mut swarm = Swarm::new(keypair).await?;
swarm.join("team/notes", JoinOpts::default()).await?;

while let Some(msg) = swarm.next().await {
    if msg.verify(&trusted_keys) { handle(msg.payload); }
}