Native Rust actor runtime with Python bindings — supervised concurrency from one core to a cluster.
Project description
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 |
atomr-persistence |
Event sourcing — journals, snapshots, recovery, async snapshotting |
atomr-persistence-query |
Tagged event streams over journals |
atomr-persistence-{sql,redis,mongodb,cassandra,aws,azure} |
Storage adapters |
atomr-persistence-tck |
Conformance suite for journal + snapshot implementations |
atomr-streams |
Typed reactive streams (sources, flows, sinks, junctions, hubs, kill switches) |
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 |
Plus a Python facade — pip install atomr — that exposes the same
actor model with GIL-isolated interpreter pools for CPU-bound work and
async-native tell / ask.
Quick start (Rust)
The umbrella crate is published on crates.io as atomr:
[dependencies]
atomr = { version = "0.1", features = ["cluster", "persistence"] }
Or pull in subsystem crates directly — atomr-core, atomr-cluster,
atomr-persistence, atomr-streams, etc. are all on crates.io.
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(()) }
Quick start (Python)
python -m venv .venv && source .venv/bin/activate
pip install atomr
from atomr import Actor, ActorSystem, props
class Greeter(Actor):
async def handle(self, ctx, msg):
return f"hello, {msg}"
system = ActorSystem.create_blocking("app")
ref = system.actor_of(props(Greeter), "greeter")
print(ref.ask_blocking("world", timeout=5.0)) # -> "hello, world"
system.terminate_blocking()
See docs/python.md for the GIL-strategy guide
(python-pinned, python-subinterpreter-pool per PEP 684,
python-nogil per PEP 703, python-subprocess) and the C-extension
compatibility registry.
Building from source
# Rust
cargo build --workspace
cargo test --workspace
# Python bindings (requires maturin + a Python dev toolchain)
maturin develop --release
pytest python/tests -v
# Docs (optional)
pip install mkdocs-material
mkdocs serve
Profiling
atomr ships with a cross-runtime profiler that measures the same four
scenarios (tell, ask, fanout, cpu) in Rust and Python and emits
a shared JSON schema so the two paths can be compared directly.
cargo run --release -p atomr-profiler -- --scenario all --format md
python -m atomr.profiler --scenario all --format md
See docs/profiler.md.
Layout
crates/ Rust workspace
crates/py-bindings/ PyO3 bridge crates
python/atomr/ Python package
python/tests/ Python integration tests
examples/ Runnable Rust examples
benches/ Criterion benches
scripts/ Cross-runtime tooling
docs/ mkdocs-material source
xtask/ Cargo xtask (audit, profile, bump, verify)
Learn more
docs/actors-and-agentic-computing.md— the case for actors as the substrate for agentic + heterogeneous compute.docs/architecture.md— runtime structure.docs/idiomatic-rust.md— design choices.docs/python.md— Python bindings + GIL strategies.docs/remoting.md— cross-process actor remoting.docs/persistence-providers.md— storage adapters.docs/dashboard.md— live system UI.docs/observability.md— tracing + metrics exporters.docs/profiler.md— cross-runtime profiler.PORTING.md— alignment with prior-art runtimes.PORTING_TODO.md— depth roadmap.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file atomr-0.1.0-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: atomr-0.1.0-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9945aafc2dcf1ececce0eff3d169c775dde26abf6b047d7e2107c73ac6bbe2b2
|
|
| MD5 |
9964b3a4c7ed78df0ed720ecd2a345d7
|
|
| BLAKE2b-256 |
716f69de717faebd97308ce5ae2b8c9022a0854400b3edfbfa2dc7a8f700da44
|
Provenance
The following attestation bundles were made for atomr-0.1.0-cp310-abi3-win_amd64.whl:
Publisher:
release.yml on rustakka/atomr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atomr-0.1.0-cp310-abi3-win_amd64.whl -
Subject digest:
9945aafc2dcf1ececce0eff3d169c775dde26abf6b047d7e2107c73ac6bbe2b2 - Sigstore transparency entry: 1436873103
- Sigstore integration time:
-
Permalink:
rustakka/atomr@06dc272a2fb639c693cd363d9a39bbb869718cdb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rustakka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@06dc272a2fb639c693cd363d9a39bbb869718cdb -
Trigger Event:
push
-
Statement type:
File details
Details for the file atomr-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: atomr-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.10+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66561fcef5da5e61dacc85dc621a565c6ea0bf33c7d6cf6cb8d073d33b080777
|
|
| MD5 |
b0ae880b4e7a6dc62d514f6b666fe0a6
|
|
| BLAKE2b-256 |
9690ed8b3e11f2fdc8f456bb99c0dd99536e0afb3ebaac9d77fe4716cac048e2
|
Provenance
The following attestation bundles were made for atomr-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on rustakka/atomr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atomr-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl -
Subject digest:
66561fcef5da5e61dacc85dc621a565c6ea0bf33c7d6cf6cb8d073d33b080777 - Sigstore transparency entry: 1436873108
- Sigstore integration time:
-
Permalink:
rustakka/atomr@06dc272a2fb639c693cd363d9a39bbb869718cdb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rustakka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@06dc272a2fb639c693cd363d9a39bbb869718cdb -
Trigger Event:
push
-
Statement type:
File details
Details for the file atomr-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: atomr-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.7 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e240c1657f4b4355184ae37ac1ab136d6162e6cce51db0aec6ead9394982a6fd
|
|
| MD5 |
f751781a0170bb2fcf33a5be13b9e778
|
|
| BLAKE2b-256 |
c68f6c717b2aa52e40da6fe146437fb0a92491ebe5c1f88dd5ebb8d80d222e6c
|
Provenance
The following attestation bundles were made for atomr-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on rustakka/atomr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atomr-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
e240c1657f4b4355184ae37ac1ab136d6162e6cce51db0aec6ead9394982a6fd - Sigstore transparency entry: 1436873113
- Sigstore integration time:
-
Permalink:
rustakka/atomr@06dc272a2fb639c693cd363d9a39bbb869718cdb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rustakka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@06dc272a2fb639c693cd363d9a39bbb869718cdb -
Trigger Event:
push
-
Statement type:
File details
Details for the file atomr-0.1.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: atomr-0.1.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 5.0 MB
- Tags: CPython 3.10+, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65ac651a46825f72910801d0192f9dc060336d1edb3b0a2f1b72434f7b1ca809
|
|
| MD5 |
b915c9d6762ab3a5c8aec508574052e8
|
|
| BLAKE2b-256 |
d5db7e9e289b2b65d9d0397ead1ebf3e57ab8f36522f13e081319a67fc52278d
|
Provenance
The following attestation bundles were made for atomr-0.1.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:
Publisher:
release.yml on rustakka/atomr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atomr-0.1.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl -
Subject digest:
65ac651a46825f72910801d0192f9dc060336d1edb3b0a2f1b72434f7b1ca809 - Sigstore transparency entry: 1436873121
- Sigstore integration time:
-
Permalink:
rustakka/atomr@06dc272a2fb639c693cd363d9a39bbb869718cdb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/rustakka
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@06dc272a2fb639c693cd363d9a39bbb869718cdb -
Trigger Event:
push
-
Statement type: