docs.rs failed to build saorsa-core-0.2.7
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
saorsa-core-0.10.4
Saorsa Core
Core P2P networking library for Saorsa platform with DHT, QUIC transport, four-word addresses, and MCP integration.
Features
- DHT (Distributed Hash Table): Advanced DHT implementation with RSPS (Root-Scoped Provider Summaries)
- QUIC Transport: High-performance networking with ant-quic
- Four-Word Addresses: Human-readable network addresses
- MCP Integration: Model Context Protocol support
- Post-Quantum Cryptography: Future-ready cryptographic algorithms
- WebRTC Support: Voice and video calling capabilities
- Media Processing: Image and audio processing with blurhash and symphonia
- Geographic Routing: Location-aware networking
- Identity Management: Ed25519-based identity system
- Secure Storage: Database persistence with SQLx
- Monitoring: Prometheus metrics integration
Quick Start
Add this to your Cargo.toml:
[]
= "0.2.6"
Basic DHT Node
use ;
use tokio;
async
Four-Word Addresses
use NetworkAddress;
// Create from IP:port
let addr = from_ipv4;
// Get four-word representation
if let Some = addr.four_words
// Parse from four-word format
let addr = from_four_words?;
MCP Server
use ;
async
Architecture
Core Components
- Network Layer: QUIC-based P2P networking with NAT traversal
- DHT: Kademlia-based DHT with RSPS optimization
- Identity: Ed25519 cryptographic identities with four-word addresses
- Storage: Local and distributed content storage
- Geographic Routing: Location-aware message routing
- MCP Integration: Model Context Protocol for AI/LLM integration
Data Flow
Application
↓
Network API
↓
DHT + Geographic Routing
↓
QUIC Transport (ant-quic)
↓
Internet
Configuration
use NetworkConfig;
let config = NetworkConfig ;
Feature Flags
default- DHT, MCP, ant-quic, four-word-addressesdht- DHT functionalitymcp- MCP server supportfour-word-addresses- Human-readable addressesant-quic- QUIC transportquantum-resistant- Post-quantum cryptographythreshold- Threshold cryptographycli- CLI utilitiesmetrics- Prometheus metricscommercial- Commercial license features
Performance
Saorsa Core is designed for high performance:
- Concurrent Operations: Tokio-based async runtime
- Memory Efficiency: Zero-copy operations where possible
- Network Optimization: QUIC with congestion control
- Caching: Multi-level caching with Q-learning optimization
Benchmarks
Run benchmarks with:
Key benchmarks:
- DHT operations: ~10,000 ops/sec
- Storage throughput: ~100 MB/sec
- Geographic routing: <10ms latency
- Cryptographic operations: Hardware-accelerated
Security
- Ed25519 Signatures: All operations cryptographically signed
- BLAKE3 Hashing: Fast and secure content addressing
- QUIC Encryption: Transport-level encryption
- Post-Quantum Ready: ML-KEM and ML-DSA support
- Secure Memory: Platform-specific memory protection
WebRTC Integration
Full WebRTC stack for real-time communication:
use ;
let webrtc = new.await?;
let call = webrtc.create_call.await?;
Media Processing
Built-in media processing capabilities:
- Images: JPEG, PNG, WebP, GIF support with blurhash
- Audio: Full codec support via symphonia
- Streaming: Real-time media streaming over WebRTC
Database Integration
SQLite-based persistence with migrations:
use Database;
let db = open.await?;
db.store_message.await?;
Geographic Features
Location-aware networking:
- Geographic distance calculations
- Location-based routing
- Regional content distribution
- Privacy-preserving location services
Development
Building
# Standard build
# With all features
# Feature-specific build
Testing
# Unit tests
# Integration tests
# Property-based tests
Linting
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
Code Style
- Follow Rust 2024 idioms
- Use
cargo fmtfor formatting - Ensure
cargo clippypasses - Add documentation for public APIs
- Include tests for all new features
License
This project is dual-licensed:
- AGPL-3.0: Open source license for open source projects
- Commercial: Commercial license for proprietary projects
For commercial licensing, contact: saorsalabs@gmail.com
Dependencies
Core Dependencies
tokio- Async runtimefutures- Future utilitiesserde- Serializationanyhow- Error handlingtracing- Logging
Networking
ant-quic- QUIC transportfour-word-networking- Human-readable addressesrustls- TLS support
Cryptography
ed25519-dalek- Digital signaturesblake3- Hashingrand- Random number generationx25519-dalek- Key exchangeaes-gcm- Symmetric encryption
Storage & Database
sqlx- Database operationslru- LRU cachingreed-solomon-erasure- Error correction
Media & WebRTC
webrtc- WebRTC implementationimage- Image processingsymphonia- Audio codecsrodio- Audio playback
See Cargo.toml for complete dependency list.
Changelog
See CHANGELOG.md for version history.
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: saorsalabs@gmail.com
Saorsa Labs Limited - Building the decentralized future