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.
- 🦀
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.
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 ontracing. 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
thiserrorfor strict and understandable error typing.
- Automatic style and linting control via
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
For project build you need Rust version 1.85+ (because we will use Edition 2024).
rustup update stable
Bash
git clone https://github.com/vazonhub/rhizome.git
cd rhizome
cargo build
For running tests you can use:
Bash
# Run all tests
cargo test
# Run tests with logs in console
RUST_LOG=debug cargo test -- --nocapture
In project, we have some feature for code analyze and formating:
- Formating by (
cargo fmt) - Analyze linter by (
cargo clippy)
We are happy to see your Pull Requests!
- Create fork from
developbranch; - Create branch:
git checkout -b feature/amazing-feature; - Commit changes:
git commit -m 'Add amazing feature'; - Create push in your branch:
git push origin feature/amazing-feature; - Check pre-commit result. If you have any troubles you can't push anything.
- Open
Pull Request.
We use git flow in branch architecture.
Create your pull request indevelopbranch.
Distributed under the Apache 2.0 license. Details in the file LICENSE.
Rhizome Dev Team - GitHub.
Inspired by the resilience of nature. Built for the freedom of speech.