Runact
A Rust-native actor runtime combining BEAM-style lightweight processes, messaging, scheduling, and supervision with Rust's ownership model.
Features
- Actor trait — synchronous
fn handle(&mut self, msg, ctx)with typed messages - Work-stealing scheduler — per-worker run queues, cooperative yield via reduction counting
- Request-reply —
Runtime::request()withRequestHandle::recv()/try_recv()/recv_timeout() - Supervision —
RestartStrategy::OneForOnewith exponential backoff - Compute pool — offload CPU-intensive work to a thread pool with panic isolation and cancellation
- Timers — one-shot and periodic with drift correction
- Resources — type-safe capability-based resource management
- Backpressure — bounded mailbox with
MailboxFullerror on overflow - Observability — structured logging via
tracing
Quick Start
use ;
;
let mut runtime = new.unwrap;
let id = runtime.spawn.unwrap;
runtime.send.unwrap;
Documentation
MSRV
Rust 1.80 (last 3 stable releases policy).
License
MIT OR Apache-2.0