0
0
Fork 0
forked from freeipa/agirru
Named after the ancient Akkadian deity of fire and light (Girru), combined with the Sumerian root A ("fluid / water"), Agirru is a lightweight, decentralized gossip protocol designed to spread cluster state with the fluidity of liquid and the rapid velocity of a wildfire. Whether you are maintaining membership lists, resolving vector clock conflicts, or pushing eventual consistency updates across hundreds of nodes, Agirru provides a resilient, peer-to-peer communication backbone with zero single points of failure.
  • Rust 94.3%
  • Shell 5.7%
Find a file
Alexander Bokovoy baf2912882 ci: install mdbook-mermaid for the doc job now that docs/ exists
book.toml declares mdbook-mermaid as a required preprocessor, so
local-ci.sh's doc job and the TMT doc test both need it alongside
mdbook to build docs/ successfully instead of failing on a missing
preprocessor.

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
2026-08-14 22:43:06 +03:00
.fmf ci: add Testing Farm and TMT infra 2026-08-14 22:30:51 +03:00
.github/workflows ci: add Testing Farm and TMT infra 2026-08-14 22:30:51 +03:00
contrib/tmt ci: install mdbook-mermaid for the doc job now that docs/ exists 2026-08-14 22:43:06 +03:00
crates docs: add root and per-crate README files 2026-08-14 22:30:21 +03:00
docs docs: add mdBook documentation in docs/ 2026-08-14 22:43:01 +03:00
scripts ci: install mdbook-mermaid for the doc job now that docs/ exists 2026-08-14 22:43:06 +03:00
.gitignore docs: add mdBook documentation in docs/ 2026-08-14 22:43:01 +03:00
Cargo.toml chore: point repository metadata at Fedora Forge 2026-08-14 22:30:21 +03:00
LICENSE-APACHE chore: add MIT and Apache-2.0 license files 2026-08-14 22:30:21 +03:00
LICENSE-MIT chore: add MIT and Apache-2.0 license files 2026-08-14 22:30:21 +03:00
README.md docs: add root and per-crate README files 2026-08-14 22:30:21 +03:00

agirru

Asynchronous Gossip Information Retrieval and Replication Utility — a push-pull anti-entropy gossip engine and a small set of causal-tag CRDT primitives for replicating state across peers, written in Rust for Tokio.

agirru doesn't ship a network stack, a storage engine, or a peer discovery mechanism. It defines the merge/delta/gossip protocol as traits, and an application supplies the Transport, Membership, Storage, and (optionally) GossipHooks implementations that fit its own environment — an HTTP client, a QUIC stream, an in-process channel for tests, whatever.

Workspace layout

Crate Description
agirru Facade crate — re-exports agirru-crdt and agirru-engine, plus the #[derive(Merge)]/#[derive(Delta)]/#[derive(ReplicaScoped)] macros. Depend on this one.
agirru-crdt Causal-tag CRDT primitives (RwMap, GCounter, PnCounter, LwwRegister, DwRegister, VectorClock, GenerationClock). No I/O, no async, no network types.
agirru-engine The Transport/Membership/Storage/GossipHooks/Codec traits and the GossipEngine push-pull anti-entropy round loop.
agirru-derive #[derive(Merge)] / #[derive(Delta)] / #[derive(ReplicaScoped)] proc macros for aggregate state structs.
agirru-sim Reference in-memory Transport/Storage/Membership implementations, used by the convergence test suite and the three_node_convergence example. Not published.

Quick example

use agirru::{Clock, GenerationClock, LwwRegister, Merge, ReplicaId};

let gen = GenerationClock::new();
let mut clock = Clock::new(ReplicaId::from_bytes([1; 16]));
let mut reg: LwwRegister<&str> = LwwRegister::default();
reg.set("hello", clock.tick(1), &gen);
assert_eq!(reg.get(), Some(&"hello"));

A full end-to-end demo — spinning up a mesh of gossiping nodes, writing keys, and watching them converge — lives at crates/agirru-sim/examples/three_node_convergence.rs:

cargo run --release --example three_node_convergence -p agirru-sim

Building and testing

cargo build --workspace
cargo test --workspace

License

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.