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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
//! # atomr
//!
//! A native Rust runtime for **actor-based concurrent and distributed
//! systems**. One programming model — addressable units of state plus
//! behavior, communicating by asynchronous messages — that scales from
//! a single core to a cluster, and increasingly from CPU to GPU.
//!
//! This is the **umbrella crate**. Pull in additional subsystems via
//! Cargo feature flags; each feature also re-exports the underlying
//! crate under a stable namespace.
//!
//! ```toml
//! [dependencies]
//! atomr = { version = "0.1", features = ["cluster", "persistence", "streams"] }
//! ```
//!
//! ```ignore
//! use atomr::prelude::*;
//! use atomr::cluster; // re-export of `atomr-cluster`
//! use atomr::persistence; // re-export of `atomr-persistence`
//! use atomr::streams; // re-export of `atomr-streams`
//! ```
//!
//! # Quick start
//!
//! ```ignore
//! use atomr::prelude::*;
//!
//! #[derive(Default)]
//! struct Greeter;
//!
//! #[async_trait::async_trait]
//! impl Actor for Greeter {
//! type Msg = String;
//! async fn handle(&mut self, _ctx: &mut Context<Self>, msg: String) {
//! println!("hi {msg}");
//! }
//! }
//!
//! # async fn run() -> Result<(), Box<dyn std::error::Error>> {
//! let system = ActorSystem::create("S", Config::empty()).await?;
//! let greeter = system.actor_of(Props::create(Greeter::default), "greeter")?;
//! greeter.tell("world".to_string());
//! system.terminate().await;
//! # Ok(()) }
//! ```
//!
//! # Feature flags
//!
//! | Feature | Re-exports as | What it adds |
//! |---|---|---|
//! | `macros` (default) | `atomr::macros` | `#[derive(Actor)]`, `props!`, `#[derive(Receive)]` |
//! | `testkit` | `atomr::testkit` | Probes, virtual time, multi-node spec |
//! | `remote` | `atomr::remote` | Cross-process / cross-host messaging |
//! | `cluster` | `atomr::cluster` | Membership, gossip, reachability, SBR |
//! | `cluster-tools` | `atomr::cluster_tools` | Singleton, distributed pub/sub, cluster client |
//! | `cluster-sharding` | `atomr::cluster_sharding` | Sharded entities with rebalance |
//! | `cluster-metrics` | `atomr::cluster_metrics` | Adaptive load balancing |
//! | `distributed-data` | `atomr::distributed_data` | CRDT replicator |
//! | `persistence` | `atomr::persistence` | Event sourcing — journals + snapshots |
//! | `persistence-query` | `atomr::persistence_query` | Tagged event streams |
//! | `streams` | `atomr::streams` | Typed reactive streams DSL |
//! | `coordination` | `atomr::coordination` | Lease primitives |
//! | `discovery` | `atomr::discovery` | Service discovery |
//! | `di` | `atomr::di` | DI container |
//! | `hosting` | `atomr::hosting` | Builder API |
//! | `telemetry` | `atomr::telemetry` | Tracing, metrics, exporters |
//! | `full` | (everything above) | Every subsystem + macros + testkit |
//! | `cluster-app` | (cluster-grade subset) | Cluster-grade application bundle |
//!
//! Each subsystem also publishes as its own crate (`atomr-cluster`,
//! `atomr-persistence`, …). If you only need one, depending on it
//! directly avoids the umbrella's resolver indirection.
//!
//! See the [repository README] for architecture and the
//! [actors-and-agentic-computing] doc for the unified-compute thesis.
//!
//! [repository README]: https://github.com/rustakka/atomr
//! [actors-and-agentic-computing]: https://github.com/rustakka/atomr/blob/main/docs/actors-and-agentic-computing.md
pub use atomr_config as config;
pub use atomr_core as core;
pub use atomr_macros as macros;
pub use atomr_testkit as testkit;
pub use atomr_remote as remote;
pub use atomr_cluster as cluster;
pub use atomr_cluster_tools as cluster_tools;
pub use atomr_cluster_sharding as cluster_sharding;
pub use atomr_cluster_metrics as cluster_metrics;
pub use atomr_distributed_data as distributed_data;
pub use atomr_persistence as persistence;
pub use atomr_persistence_query as persistence_query;
pub use atomr_streams as streams;
pub use atomr_coordination as coordination;
pub use atomr_discovery as discovery;
pub use atomr_di as di;
pub use atomr_hosting as hosting;
pub use atomr_telemetry as telemetry;
/// Re-exports of the most commonly used types.
///
/// ```ignore
/// use atomr::prelude::*;
/// ```