2026-02-27 22:29:29 +05:30

2.9 KiB

logos-delivery Rust Bindings

Crates.io Documentation Build Status Codecov Status

Rust bindings for logos-delivery (Waku) v0.38.0-beta, built on top of the C FFI.

Prerequisites

  • Rust (stable) — rustup.rs
  • Nim 2.x — required to compile the native libwaku library
  • Make
  • GCC or Clang

Setup

Clone the repository:

git clone https://github.com/logos-messaging/logos-delivery-rust-bindings.git
cd logos-delivery-rust-bindings

The first cargo build / cargo run automatically:

  1. Initializes and updates git submodules
  2. Compiles the native libwaku static library via make libwaku STATIC=1
  3. Generates Rust FFI bindings via bindgen

Running the Examples

basic

Two Waku nodes in the same process. Node 1 publishes a message; node 2 receives it via relay subscription.

cd examples/basic
cargo run

toy-chat

Multi-participant chat room over Waku relay. Pass your nickname as argument.

cd examples/toy-chat
cargo run "Alice"

Start another instance in a separate terminal (or on another machine) to chat:

cargo run "Bob"

tic-tac-toe-gui

Multiplayer tic-tac-toe with a native GUI (eframe). Start two instances — locally or on separate machines.

cd examples/tic-tac-toe-gui
cargo run

Running the Tests

Tests start real Waku nodes and bind to local TCP ports, so they must run serially:

# from repo root
cargo test -p waku-bindings -- --test-threads=1

# or from waku-bindings/
cd waku-bindings
cargo test

To see log output:

cargo test -- --nocapture

Crates

Crate Description
waku-bindings High-level Rust API
waku-sys Low-level bindgen FFI bindings

About Waku

Waku is a family of robust, censorship-resistant communication protocols for Web3. Private. Secure. Runs anywhere.

Read the Waku docs