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
//! # TheNodes Core Library
//!
//! Modular, plugin-driven P2P node framework supporting two operation modes:
//!
//! * **NEP (Node-Embedded Plugins):** Host binary loads dynamic plugins at runtime.
//! * **CAL (Core-as-a-Library):** Embed core logic in another application.
//!
//! ## Design Principles
//! * Async-first: all I/O paths are non-blocking (Tokio + async traits).
//! * Pluggable extension surface via `plugin_host`.
//! * Realm isolation for logical network partitioning.
//! * Optional encryption & trust policy with PKI directory model.
//! * Event-driven instrumentation (JSON line audit log + console).
//! * Progressive enhancement: features (discovery, trust policy depth, roles) can be enabled incrementally.
//!
//! ## Key Modules
//! * `config` – Runtime configuration & plugin-provided defaults.
//! * `network` – Transport, peer management, discovery, protocol messages.
//! * `security` – Encryption (TLS optional) & trust policy scaffolding.
//! * `plugin_host` – Dynamic plugin loading + dispatch context.
//! * `realms` – RealmInfo definitions for segmentation.
//! * `events` – Structured logging/events dispatcher.
//! * `prompt` – Optional interactive prompt integration.
//!
//! ## Changelog
//! See `CHANGELOG.md` for unreleased changes while pre-1.0.
//!
//! ## Status
//! Pre-initial public release. APIs may change without notice until version 0.1.0 is tagged.
//!
//! ## Roadmap (High-Level)
//! * Policy-based role / node_type communication matrix (incl. data diode semantics)
//! * Reliability tiers (WAL, replay, at-least/exactly-once event durability)
//! * Extended transport support (QUIC) & crypto plugin strategy
//! * Capability negotiation in handshake
//! * Enhanced discovery gossip strategies
// curated stable-intent re-exports
// common helpers (naming, etc.)
/// TheNodes Core Struct
/// Exports for NEP (Node-Embedded Plugin)
pub extern "C"