rhizome-p2p

Crates.iorhizome-p2p
lib.rsrhizome-p2p
version0.0.5
created_at2026-01-12 12:14:39.964334+00
updated_at2026-01-15 15:33:33.818965+00
descriptionDistributed P2P networking library for the Rhizome ecosystem
homepage
repositoryhttps://github.com/vazonhub/rhizome
max_upload_size
id2037625
size475,977
Konstantsin Betenya (kostyabet)

documentation

https://docs.rs/rhizome-p2p

README

Rhizome - P2P protocol

Crates.io Documentation License Rust Edition Platform

Rhizome is a highβ€”performance, decentralized P2P messaging library implemented on Rust. It is based on the Kademlia DHT protocol with custom data replication and content ranking mechanisms.

✨ Features

  • πŸ¦€ Rust Core: Maximum performance and memory security without GC.
  • πŸ”’ Anonymity: DHT-based routing hides direct connections between network participants.
  • ⚑ Async First: A fully asynchronous stack based on tokio and futures.
  • πŸ”„ Smart replication: Automatic distribution of data to k-nearest nodes.
  • πŸ“ˆ Popularity system: Content in demand gets storage priority and a higher TTL.
  • πŸ“¦ Modularity: You can use it as a ready-made CLI node, or connect it as a library (cargo lib) to your project.

πŸ›  Technology stack

  • Runtime & Async: Fully asynchronous architecture based on tokio (full) and futures. Using async-trait for flexible component design.
  • Persistence (Storage): heed is a highβ€”performance embedded database (a wrapper over LMDB) that provides ACID transactions and instant access to data.
  • Cryptography & Security:
  • RSA (with SHA-2 support) for key management and digital signatures.
    • sha1, sha2, digest β€” a set of cryptographic hash functions for data integrity and identification in DHT.
  • Serialization:
    • rmp-serde (MessagePack) is the main binary protocol for minimizing traffic in a P2P network.
    • serde_json & serde_yaml β€” for configuration and external `APIs'.
  • Observability (Logging): An advanced system based on tracing. Support for structured logging (JSON), filtering via env-filter, and log file rotation via tracing-appender.
  • Portability (WASM): Support for compilation to `WebAssembly' (wasm-bindgen) for use in browser environments, including integration with getrandom/js.
  • Development & Quality:
    • Automatic style and linting control via cargo-husky (pre-commit hooks for fmt and clippy).
    • The use of thiserror for strict and understandable error typing.

πŸ“‚ Project structure

rhizome/
β”œβ”€β”€ examples/            # Examples of the system operation
β”œβ”€β”€ src/                 # The main project code
β”‚   β”œβ”€β”€ config.rs        # Configuration Module
β”‚   β”œβ”€β”€ logger.rs        # The logging module
β”‚   β”œβ”€β”€ api.rs           # API module for external operation
β”‚   β”œβ”€β”€ exception.rs     # Error management module
β”‚   β”œβ”€β”€ dht/             # Kademlia DHT Module
β”‚   β”œβ”€β”€ network/         # Network operation module
β”‚   β”œβ”€β”€ node/            # Node Module
β”‚   β”œβ”€β”€ popularity/      # A module for the operation of the reputation system
β”‚   β”œβ”€β”€ replication/     # Data replication
β”‚   β”œβ”€β”€ storage/         # Storage System Module
β”‚   β”œβ”€β”€ utils/           # Auxiliary functions module
β”‚   └── security/        # The security module

πŸ›  Setup and develop

For project build you need Rust version 1.85+ (because we will use Edition 2024).

rustup update stable

Clone and build

Bash
git clone https://github.com/vazonhub/rhizome.git
cd rhizome

cargo build

Run tests

For running tests you can use:

Bash
# Run all tests
cargo test

# Run tests with logs in console
RUST_LOG=debug cargo test -- --nocapture

Static analyze and formating

In project, we have some feature for code analyze and formating:

  • Formating by (cargo fmt)
  • Analyze linter by (cargo clippy)

🀝 Participation in the development

We are happy to see your Pull Requests!

  1. Create fork from develop branch;
  2. Create branch: git checkout -b feature/amazing-feature;
  3. Commit changes: git commit -m 'Add amazing feature';
  4. Create push in your branch: git push origin feature/amazing-feature;
  5. Check pre-commit result. If you have any troubles you can't push anything.
  6. Open Pull Request.

We use git flow in branch architecture.
Create your pull request in develop branch.

πŸ“„ License

Distributed under the Apache 2.0 license. Details in the file LICENSE.

πŸ‘₯ Author

Rhizome Dev Team - GitHub.


Inspired by the resilience of nature. Built for the freedom of speech.

Commit count: 107

cargo fmt