Expand description
§Saorsa Core
A next-generation peer-to-peer networking foundation built in Rust.
§Features
- QUIC-based transport for modern networking
- IPv6-first with comprehensive tunneling support
- Kademlia DHT for distributed routing
- Built-in MCP server for AI capabilities
- Minimal dependencies and small footprint
§Example
use saorsa_core::{P2PNode, NodeConfig};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let node = P2PNode::builder()
.listen_on("/ip6/::/tcp/9000")
.with_mcp_server()
.build()
.await?;
node.run().await?;
Ok(())
}Re-exports§
pub use network::P2PNode;pub use network::NodeConfig;pub use network::NodeBuilder;pub use network::P2PEvent;pub use dht::Key;pub use dht::Record;pub use dht_network_manager::DhtNetworkManager;pub use dht_network_manager::DhtNetworkConfig;pub use dht_network_manager::DhtNetworkOperation;pub use dht_network_manager::DhtNetworkResult;pub use dht_network_manager::DhtNetworkEvent;pub use dht_network_manager::DhtPeerInfo;pub use dht_network_manager::BootstrapNode;pub use mcp::MCPServer;pub use mcp::Tool;pub use mcp::MCPService;pub use production::ProductionConfig;pub use production::ResourceManager;pub use production::ResourceMetrics;pub use bootstrap::BootstrapManager;pub use bootstrap::BootstrapCache;pub use bootstrap::ContactEntry;pub use bootstrap::CacheConfig;pub use error::P2PError;pub use error::Result;pub use storage::StorageManager;pub use storage::FileChunker;pub use chat::Channel;pub use chat::ChannelId;pub use chat::Message;pub use chat::MessageId;pub use chat::Thread;pub use chat::ChatManager;pub use chat::ChannelType;pub use chat::Call;pub use discuss::Category;pub use discuss::CategoryId;pub use discuss::Topic;pub use discuss::TopicId;pub use discuss::Reply;pub use discuss::ReplyId;pub use discuss::DiscussManager;pub use discuss::Poll;pub use discuss::Badge;pub use discuss::UserStats;pub use projects::Project;pub use projects::ProjectId;pub use projects::Document;pub use projects::DocumentId;pub use projects::Folder;pub use projects::ProjectsManager;pub use projects::WorkflowState;pub use projects::ProjectAnalytics;pub use threshold::ThresholdGroup;pub use threshold::ThresholdSignature;pub use threshold::ThresholdGroupManager;pub use threshold::ParticipantInfo;pub use threshold::GroupMetadata;pub use quantum_crypto::types::GroupId;pub use quantum_crypto::types::ParticipantId;
Modules§
- bootstrap
- Bootstrap cache for decentralized peer discovery Bootstrap Cache System
- chat
- Chat system (Slack-like) Chat system (Slack-like) with channels, threads, and real-time messaging
- dht
- Distributed Hash Table implementation Distributed Hash Table (DHT) Implementation
- dht_
network_ manager - DHT Network Integration Manager DHT Network Manager
- discuss
- Discuss system (Discourse-like) Discuss system (Discourse-like) for long-form discussions and knowledge sharing
- error
- Error types Error types module
- identity
- User identity and privacy system Identity management module
- mcp
- Model Context Protocol server Model Context Protocol (MCP) Server Implementation
- network
- Network core functionality Network module
- production
- Production hardening features Production hardening features for the P2P Foundation
- projects
- Projects system with hierarchical organization Projects system with hierarchical organization structure
- quantum_
crypto - Quantum-resistant cryptography Quantum-resistant cryptography module
- security
- Security and cryptography Security module
- storage
- DHT-based storage for multi-device sync DHT-based storage module for multi-device synchronization
- threshold
- Threshold cryptography for group operations Threshold cryptography module
- transport
- Transport layer (QUIC, TCP) Transport Layer
- tunneling
- IPv6/IPv4 tunneling protocols IPv6/IPv4 Tunneling Implementation
- utils
- Utility functions and types Utilities module placeholder
Constants§
- VERSION
- Saorsa Core version