atomr
A native Rust runtime for actor-based concurrent and distributed
systems, with first-class Python bindings. atomr gives you a single
mental model — addressable units of state plus behavior, communicating
by asynchronous messages — that scales from a single core to a cluster,
and increasingly from a CPU to a GPU.
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}");
}
}
Why an actor runtime, in Rust, now
The actor model is the same idea wherever it runs: a small, addressable
unit of state plus behavior, talking to other actors by asynchronous
message passing. That model is a good fit for two converging trends.
Agentic systems. Long-lived, autonomous, collaborating processes
that reason, call tools, and coordinate are exactly what supervised,
addressable actors describe. Each agent is an actor; conversations are
mailboxes; tool calls are typed messages; failure is supervised, not
silently swallowed. atomr gives that model a runtime that doesn't trade
performance for safety.
Unified compute. Modern workloads no longer live entirely on the
CPU. Inference, embedding, scoring, simulation — they want a GPU.
Coordination, control flow, I/O, persistence — they want a CPU.
Today's stacks force you to glue the two with ad-hoc batching layers,
queues, and serialization boundaries. The actor model already encodes
the right boundary: a message is the dispatch unit. atomr is built so
that the same actor_ref.tell(msg) can target a CPU mailbox today and
a CUDA-backed dispatcher tomorrow — with the same supervision, the
same backpressure, the same observability. The runtime is explicit
about where work runs without forcing the developer to write two
programs.
Granular efficiency. Rust gives us deterministic resource use,
zero-cost abstractions, and ownership-as-concurrency-safety.
Per-message cost stays low. Per-actor footprint stays small. The
scheduler can hand work to a tokio worker, a dedicated dispatcher,
or — by design — a GPU stream, without changing the message contract.
That same precision lets the runtime push backpressure, mailboxes, and
supervision down to a level where they don't need to be rebuilt at
every layer above.
A longer argument is in
docs/actors-and-agentic-computing.md.
What's in the box
| Crate | What it does |
|---|
atomr | Umbrella facade re-exporting the core types |
atomr-core | Actors, supervision, dispatch, mailboxes, FSMs, event stream, coordinated shutdown |
atomr-config | HOCON-style layered configuration |
atomr-macros | Ergonomic derives and helpers |
atomr-testkit | Probes, virtual time, deterministic test scaffolding |
atomr-remote | Location-transparent messaging across processes (TCP + framed PDU + reliable delivery) |
atomr-cluster | Membership, gossip, reachability, split-brain resolution |
atomr-cluster-tools | Singleton, pub/sub, cluster-client patterns |
atomr-cluster-sharding | Shard regions, rebalance, remember-entities, persistent coordinator |
atomr-cluster-metrics | Adaptive load balancing |
atomr-distributed-data | Convergent replicated data types (CRDTs) over the cluster — OrMap, LWWMap, PNCounterMap, ORMultiMap, replicator subscribe |
atomr-distributed-data-lmdb | redb-backed DurableStore for distributed-data |
atomr-persistence | Event sourcing — journals, snapshots, recovery, async snapshotting, persistent FSM, ALOD |
atomr-persistence-query | Tagged event streams over journals |
atomr-persistence-query-inmemory | In-memory query journal for tests + samples |
atomr-persistence-{sql,redis,mongodb,cassandra,aws,azure} | Storage adapters (Postgres / MySQL / Redis / Mongo / Cassandra / DynamoDB / Azurite) |
atomr-persistence-tck | Conformance suite — journal_replay_edge_cases, snapshot_extended_suite, concurrent + extended journal suites |
atomr-streams | Typed reactive streams (sources, flows, sinks, junctions, hubs, kill switches, sub-streams, conflate/expand, merge_sorted/merge_prioritized, queue/restart) |
atomr-serialization-hyperion | Hyperion-compatible serializer surface |
atomr-coordination | Lease-based leadership primitives |
atomr-discovery | Pluggable service discovery |
atomr-di | Dependency-injection container |
atomr-hosting | Builder API for wiring system + config + DI together |
atomr-telemetry | Tracing, metrics, exporters |
atomr-dashboard | Live web UI over the running system |