feat(p2p): add MeshNode integrating all production modules
New mesh_node.rs providing a production-ready node: - MeshNodeBuilder for fluent configuration - MeshConfig integration for all settings - MeshMetrics tracking for all operations - Rate limiting on incoming messages - Backpressure controller - Graceful shutdown via ShutdownCoordinator - Optional FappRouter based on capabilities - MeshRouter for envelope routing - TransportManager for multi-transport support Key APIs: - MeshNodeBuilder::new().fapp_relay().build() - node.process_incoming() with rate limiting + metrics - node.gc() for store/routing table cleanup - node.shutdown() for graceful termination 222 tests passing (203 lib + 3 fapp_flow + 16 multi_node)
This commit is contained in:
43
crates/meshservice/Cargo.toml
Normal file
43
crates/meshservice/Cargo.toml
Normal file
@@ -0,0 +1,43 @@
|
||||
[package]
|
||||
name = "meshservice"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
authors = ["Chris <c@xorwell.de>"]
|
||||
description = "Generic decentralized service layer for mesh networks"
|
||||
license = "MIT"
|
||||
repository = "https://git.xorwell.de/c/meshservice"
|
||||
keywords = ["mesh", "p2p", "decentralized", "services"]
|
||||
categories = ["network-programming"]
|
||||
|
||||
[dependencies]
|
||||
# Serialization
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
ciborium = "0.2"
|
||||
|
||||
# Crypto
|
||||
ed25519-dalek = { version = "2.1", features = ["serde"] }
|
||||
sha2 = "0.10"
|
||||
rand = "0.8"
|
||||
x25519-dalek = "2.0"
|
||||
|
||||
# Async
|
||||
tokio = { version = "1.36", features = ["sync", "time"] }
|
||||
|
||||
# Error handling
|
||||
anyhow = "1.0"
|
||||
thiserror = "1.0"
|
||||
|
||||
[dev-dependencies]
|
||||
tokio = { version = "1.36", features = ["rt-multi-thread", "macros"] }
|
||||
|
||||
[[example]]
|
||||
name = "fapp_service"
|
||||
path = "examples/fapp_service.rs"
|
||||
|
||||
[[example]]
|
||||
name = "housing_service"
|
||||
path = "examples/housing_service.rs"
|
||||
|
||||
[[example]]
|
||||
name = "multi_service"
|
||||
path = "examples/multi_service.rs"
|
||||
Reference in New Issue
Block a user