brunoarueira/thoth-mesh

A federated pub/sub mesh, named for Thoth — Egyptian god of writing, wisdom, and the moon.

2

stars

88

commits

Rust

primary language

Sep 14, 2026

updated

distributed-systems
federated
gossip-protocol
message-broker
mtls
p2p
pubsub
rust
tokio

README

thoth-mesh

A federated publish/subscribe mesh, written in Rust.

Named for Thoth, the Egyptian god of writing, magic, wisdom, and the moon — scribe of the gods, recorder of events, keeper of balance. This project is a learning vehicle for going deep on Rust (async networking, concurrency, protocol design, distributed systems) beyond CLI-toy scope.

Status: early work in progress. A single node can broker pub/sub traffic over TCP end to end, nodes federate over peer links with reconnect/backoff and basic metrics, and messages can optionally be persisted to an on-disk log that survives a restart. See the roadmap for what's next. All crates are 0.x — the wire protocol and public APIs are not yet stable (see ADR-0014).

Layout

This is a Cargo workspace:

CrateKindPurpose
thoth-mesh-corelibCore protocol types and wire format shared by everything else.
thoth-mesh-brokerlibIn-process pub/sub dispatch: per-topic broadcast to subscribers.
thoth-meshlibFederation/gossip layer: peer discovery, membership, replication.
thoth-mesh-tlslibTLS transport helpers: certificate loading, config, and a plaintext/TLS stream shim.
thoth-mesh-nodebinDaemon that runs a mesh node over a network transport.
thoth-mesh-clibinCommand-line client (thoth-mesh binary) for publishing, subscribing, and admin.

Running it

For a step-by-step walkthrough — build, single-node quickstart, multi-node federation, metrics, logging, and current limitations — see docs/OPERATIONS.md.

Architecture decisions

Significant architecture decisions are recorded as ADRs in docs/adr/. For a from-scratch description of the wire protocol itself, independent of the Rust implementation, see PROTOCOL.md. For diagrams of the runtime flows that are easier to follow as a picture (handshake, gossip, propagation), see docs/FLOWS.md. For where the project is headed, see docs/ROADMAP.md.

Contributing

See CONTRIBUTING.md for the workflow: how work is planned, when a change needs an ADR, and what to run locally before opening a PR.

License

Licensed under either of

at your option.

Contributors

brunoarueira

76 commits

dependabot[bot]

12 commits

brunoarueira/thoth-mesh

A federated pub/sub mesh, named for Thoth — Egyptian god of writing, wisdom, and the moon.

2

stars

88

commits

Rust

primary language

Sep 14, 2026

updated

distributed-systems
federated
gossip-protocol
message-broker
mtls
p2p
pubsub
rust
tokio

README

thoth-mesh

A federated publish/subscribe mesh, written in Rust.

Named for Thoth, the Egyptian god of writing, magic, wisdom, and the moon — scribe of the gods, recorder of events, keeper of balance. This project is a learning vehicle for going deep on Rust (async networking, concurrency, protocol design, distributed systems) beyond CLI-toy scope.

Status: early work in progress. A single node can broker pub/sub traffic over TCP end to end, nodes federate over peer links with reconnect/backoff and basic metrics, and messages can optionally be persisted to an on-disk log that survives a restart. See the roadmap for what's next. All crates are 0.x — the wire protocol and public APIs are not yet stable (see ADR-0014).

Layout

This is a Cargo workspace:

CrateKindPurpose
thoth-mesh-corelibCore protocol types and wire format shared by everything else.
thoth-mesh-brokerlibIn-process pub/sub dispatch: per-topic broadcast to subscribers.
thoth-meshlibFederation/gossip layer: peer discovery, membership, replication.
thoth-mesh-tlslibTLS transport helpers: certificate loading, config, and a plaintext/TLS stream shim.
thoth-mesh-nodebinDaemon that runs a mesh node over a network transport.
thoth-mesh-clibinCommand-line client (thoth-mesh binary) for publishing, subscribing, and admin.

Running it

For a step-by-step walkthrough — build, single-node quickstart, multi-node federation, metrics, logging, and current limitations — see docs/OPERATIONS.md.

Architecture decisions

Significant architecture decisions are recorded as ADRs in docs/adr/. For a from-scratch description of the wire protocol itself, independent of the Rust implementation, see PROTOCOL.md. For diagrams of the runtime flows that are easier to follow as a picture (handshake, gossip, propagation), see docs/FLOWS.md. For where the project is headed, see docs/ROADMAP.md.

Contributing

See CONTRIBUTING.md for the workflow: how work is planned, when a change needs an ADR, and what to run locally before opening a PR.

License

Licensed under either of

at your option.

Contributors

brunoarueira

76 commits

dependabot[bot]

12 commits

Languages

Rust

99.8%