This project is reiny. The way the data flows is just like rain.
reiny is a Rust SDK for distributed "grains" (processes) that communicate over Zenoh pub/sub. The organizing principle is type = topic: grains publish and subscribe by Rust type, never by topic string.
- Publishing type
Tgoes toreiny/<id>/T - Subscribing to type
Treceivesreiny/*/T(the same type from every publisher)
The type → topic mapping is generated at build time by reiny-build (each
grain's build.rs) from a Reiny.toml, so user code never names a topic string.
use reiny::prelude::*;
use crate::publications::Ping; // generated by reiny-build
use crate::dependencies::pong::Pong; // ditto
#[reiny::main]
async fn main(cloudy: Cloudy) -> reiny::Result<()> {
let pings = cloudy.publish::<Ping>()?;
let mut pongs = cloudy.subscribe::<Pong>()?;
// ...
Ok(())
}| Crate | Role |
|---|---|
reiny |
The SDK itself: Cloudy (the pub/sub handle) and the #[reiny::main] runtime |
reiny-macros |
The #[reiny::main] proc-macro (used via reiny) |
reiny-build |
build.rs helper: compiles protos from Reiny.toml and generates types/topics |
reiny-launch |
Launcher library: spawns grain processes from a launch config's [grain] section |
reiny-cli |
The reiny command: scaffold (new/init/add), check, build, run, compress |
Use the reiny CLI to scaffold a grain project.
cargo install reiny-cli # installs the `reiny` command
reiny new my-grain
reiny check my-grain # show the type → topic map (no build)See examples/ for runnable demos (each is its own cargo workspace).
For larger workspaces, examples/ping-pong-schema
shows the [schema] shared-schema crate that compiles the message catalog once
instead of per grain.
MIT. See LICENSE.