eNet guides
Install
Section titled “Install”The core is on crates.io:
cargo add enet-coreThe Swift, Kotlin and WebAssembly bindings are not published yet; until they are, build exponential-net-ffi or exponential-net-wasm from the repo (ffi, wasm).
Start a node and say hi
Section titled “Start a node and say hi”let node = Node::start(NetConfig::default(), Identity::from_bytes(saved)).await?;let mut events = node.events().unwrap(); // taken oncenode.add_ticket(&"enet1…".parse()?); // learn a peer's addressesnode.access().allow(peer_id); // and let it innode.send_chat(peer_id, b"hi".to_vec()).await?; // acked by the peer- Keep the
Identity(an ed25519 secret key, 32 bytes) across restarts; its public half is the id peers dial and allowlist. - Hand peers your
Ticket(enet1…, fits a QR code) so they can find you. NetConfig::relaypicks the relay: the default, your own URLs, orDisabledfor direct addresses only.
Every channel, push encryption and the security model: Reference.