1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
//! # Runar Node
//!
//! A high-performance, distributed service mesh framework for building privacy-preserving applications.
//!
//! ## Overview
//!
//! The Runar Node provides a complete runtime environment for services to communicate, discover each other,
//! and handle requests in a distributed, encrypted manner. It's designed to be lightweight, performant,
//! and easy to integrate into existing applications.
//!
//! ## Key Features
//!
//! - **Service Registry**: Automatic service discovery and registration
//! - **Request/Response**: Type-safe service-to-service communication
//! - **Event Publishing**: Publish/subscribe pattern for loose coupling
//! - **Network Transport**: QUIC-based networking with automatic peer discovery
//! - **Load Balancing**: Built-in load balancing for distributed services
//! - **Encryption**: End-to-end encryption with selective field access
//! - **Lifecycle Management**: Automatic service lifecycle management
//!
//! ## Quick Start
//!
//! ```rust
//! use runar_node::{Node, NodeConfig};
//! use runar_node::AbstractService;
//!
//! // Example of how to create and start a node (conceptual)
//! async fn example_usage() -> anyhow::Result<()> {
//! // Note: This example shows the concept but would need proper
//! // key manager state to actually create a Node instance.
//!
//! // Create a node configuration
//! // let config = NodeConfig::new("my-node", "my-network");
//! //
//! // Create and start the node
//! // let mut node = Node::new(config).await?;
//! // node.start().await?;
//! //
//! // Your services can now communicate!
//!
//! Ok(())
//! }
//! ```
//!
//! ## Architecture
//!
//! The Runar Node is built around several core concepts:
//!
//! - **Node**: The main runtime that manages services and networking
//! - **Services**: Business logic components that handle requests and publish events
//! - **Topics**: Hierarchical addressing system for routing messages
//! - **Network**: Peer-to-peer communication layer with automatic discovery
//! - **Registry**: Service discovery and metadata management
//!
//! ## Modules
//!
//! - [`config`] - Configuration management for nodes and services
//! - [`network`] - Network transport, discovery, and peer management
//! - [`node`] - Core node implementation and lifecycle management
//! - [`routing`] - Topic-based routing and path resolution
//! - [`services`] - Service abstraction and registry management
//!
//! ## Examples
//!
//! See the `examples/` directory for complete working examples of:
//!
//! - Basic service implementation
//! - Request/response patterns
//! - Event publishing and subscription
//! - Network configuration
//! - Service lifecycle management
//!
//! ## License
//!
//! This project is licensed under the MIT License - see the LICENSE file for details.
// Public modules
// Re-export the main types from the node module
pub use ;
// Re-export the main types from the services module
pub use ;
pub use ServiceRegistry;
pub use ;
// Re-export the schema types from runar_common
pub use ;
// Re-export the main types from the routing module
pub use TopicPath;
// Re-export the main types from the network module
pub use ;
// Re-export common macros for convenience
// Version information
pub const VERSION: &str = env!;
pub const NAME: &str = env!;