Ant Core
Ant Network - Core P2P networking library with DHT, QUIC transport, three-word addresses, and MCP integration
Overview
Ant Core is a modern P2P networking library built in Rust that provides:
- QUIC Transport: Modern, efficient networking with built-in encryption
- Distributed Hash Table (DHT): Kademlia-based distributed storage
- Three-Word Addresses: Human-readable network addressing system
- MCP Integration: Model Context Protocol for AI agent communication
- Privacy-First Identity: Encrypted profiles with friend-based access control
- IPv6 Native: Full IPv6 support with IPv4 tunneling fallback
Features
🚀 High Performance
- QUIC protocol for low-latency, reliable communication
- Efficient DHT implementation with configurable parameters
- Minimal memory footprint suitable for edge deployment
🔒 Security & Privacy
- End-to-end encryption by default
- Privacy-first user identity system
- Friend-based access control for profile sharing
- Anti-spoofing with cryptographic verification
🌐 Network Agnostic
- Works across any network topology
- Automatic NAT traversal
- IPv6-first with comprehensive IPv4 tunneling
- Bootstrap system for peer discovery
🤖 AI Integration
- MCP (Model Context Protocol) server integration
- Built for AI agent communication
- Tool system for extensible functionality
Quick Start
Add this to your Cargo.toml
:
[]
= "0.1.8"
= { = "1", = ["full"] }
Basic Usage
use ;
async
Identity System
use ;
let manager = new;
// Create encrypted identity
let identity = manager.create_identity.await?;
// Export for backup
let export_data = manager.export_identity.await?;
// Import on another device
let imported = manager.import_identity.await?;
DHT Operations
use Key;
// Store data
let key = new;
let data = b"encrypted_profile_data".to_vec;
node.dht_put.await?;
// Retrieve data
if let Some = node.dht_get.await?
Architecture
Ant Core is designed with a modular architecture:
┌─────────────────┐
│ Application │
├─────────────────┤
│ Identity Mgmt │
├─────────────────┤
│ MCP Server │
├─────────────────┤
│ DHT │
├─────────────────┤
│ Transport │
│ (QUIC/TCP) │
├─────────────────┤
│ Bootstrap │
└─────────────────┘
Core Components
- Network: P2P node management and configuration
- DHT: Distributed hash table for decentralized storage
- Transport: QUIC and TCP transport implementations
- Identity: Privacy-first user identity and profile management
- MCP: Model Context Protocol server for AI integration
- Bootstrap: Peer discovery and network bootstrapping
Configuration
use ;
use Duration;
let config = NodeConfig ;
Examples
Check out the examples directory for:
- Basic P2P node setup
- DHT storage and retrieval
- Identity management
- MCP service integration
- Three-word address system
Applications
Ant Core powers:
- Saorsa: Desktop P2P application built with Tauri
- Flutter Integration: Mobile and web applications via FFI
- CLI Tools: Command-line utilities for network management
Roadmap
- Enhanced NAT traversal techniques
- Additional tunneling protocols
- Improved bootstrap strategies
- Advanced security features
- Performance optimizations
Contributing
We welcome contributions! Please see our contributing guidelines for details.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.