Weave documentation
Filament Minimal

Usage

This package is its own Cargo workspace.

Local mesh example

This package is its own Cargo workspace. LocalInterface uses an in-process MessageRouter to demonstrate peer handshakes and encrypted messages. It does not open a TCP/UDP listener or discover Internet peers.

use filament_minimal::{Identity, LocalInterface, MessageRouter};

let router = MessageRouter::new();
let alice = LocalInterface::new(Identity::generate(), router.clone());
let bob = LocalInterface::new(Identity::generate(), router.clone());

For an exchange, call alice.connect(bob.node_id()).await, process Bob's recv() handshake response, and process Alice's recv() response before send_data(peer_id, bytes).await. recv() returns Option<Result<ReceivedMessage, InterfaceError>>; handle channel closure and the inner error separately. There are no start() or send() methods on this interface.

The complete source sequence is filament-minimal/examples/simple_mesh.rs. The source is an example of local transport composition, not a deployed mesh or production security certification.

On this page