Rust actor runtime + cluster runtime workspace.
axactor: runtime crate (System,Registry,Supervisor,cluster,ref_api)axactor-macros: procedural macros (#[actor],#[msg])examples/axum_demo: local actor + axum demoexamples/axum_registry: keyed registry demoexamples/axum_cluster_chat: multi-node cluster chat demo (HTTP + cluster)
- Local runtime
- user/control mailbox split
- restart policy + restart mailbox policy (
Keep/DrainAndDrop) - link/monitor/trap-exit
- lifecycle stream (
Started,Restarted,Stopped)
- Registry
- sharded keyed registry
get_or_spawn(...) -> Result<Ref, RegistryError>- idle reaper
- Cluster
- shard lease ownership + epoch fencing (fail-closed)
- ensure-once + slot-direct routing
- monitor/demonitor/down with bounded retry queues
- handshake dedup + protocol negotiation + request/response auth verification
- runtime session ids per process; same-logical peer rotation is trusted only after handshake
- control/data plane separation
- overlays:
InMemoryOverlay,TcpOverlay - lease stores:
MemoryLeaseStore, optional Redis (redis-leasefeature)
- Ref API separation
LocalRef<M>for local zero-overhead hot pathRemoteRef<C>for wire-safe remote contracts- optional
AnyRef<C>/Addr<C>for explicit location transparency - default wire codec:
SimdJsonCodec
Cluster secure mode is default:
ClusterConfig.allow_insecure_auth = falseClusterConfig.auth_tokenis required in secure modeClusterNode::start(...)panics if secure mode is enabled with empty token
Use insecure mode only for local test/dev.
ClusterNode::start(NodeId::new("node-a"), ...) promotes the logical id into a
runtime session id internally. The public NodeId you pass remains a stable
logical name; the cluster runtime appends a @boot-<hex>-session-<n> suffix for
wire identity and only treats that exact suffix shape as a session marker.
Non-handshake frames are accepted only from:
- the exact local runtime node id for loopback
- peers that have already completed handshake for their current runtime session
This keeps same-logical session rotation working without letting unauthenticated peers bypass cluster auth by spoofing a logical node name.
TcpOverlay enables OS-level SO_KEEPALIVE by default and supports tuning:
idleintervalprobes(platform-dependent)
cargo check --workspace
cargo test --workspace --all-targets
cargo test -p axactor --no-default-features
cargo test -p axactor --all-features
cargo clippy --workspace --all-targets --all-features -- -D warningsTargeted cluster chat E2E regression:
cargo test -p axum_cluster_chat --test e2e_chat -- --nocapturecargo run -p axum_cluster_chatEnvironment knobs:
CHAT_NODES(default2)CHAT_BASE_PORT(default4100)CHAT_TCP_OVERLAY=trueto use TCP overlayCHAT_CLUSTER_BASE_PORT(defaultCHAT_BASE_PORT + 1000)CHAT_CLUSTER_TOKENshared auth tokenCHAT_TCP_KEEPALIVE=true|false(defaulttrue)CHAT_TCP_KEEPALIVE_IDLE_MS(0 = OS default)CHAT_TCP_KEEPALIVE_INTERVAL_MS(0 = OS default)CHAT_TCP_KEEPALIVE_PROBES(0 = OS default)CHAT_REDIS_URL+CHAT_REDIS_PREFIXfor Redis lease store (--features redis-lease)
- Runtime docs:
axactor/README.md - Macro docs:
axactor-macros/README.md - SLC design doc:
docs/SLC_V1_DESIGN.md - Ref API migration doc:
docs/REF_API_MIGRATION.md
If cargo hangs at Blocking waiting for file lock on package/shared package cache:
Get-Process cargo,rustc -ErrorAction SilentlyContinue | Stop-Process -ForceThen rerun your command.