rill-core-actor
Minimal, domain-agnostic actor model for lock-free message passing.
Philosophy
This is not Pekko, not Erlang/OTP. No supervision, clustering, persistence, streaming, or Kafka connectors.
Four types, two of which are optional:
| Type | Purpose | Required? |
|---|---|---|
ActorRef<M> |
Thread-safe handle for sending messages | yes |
Actor<M> |
Handler + mailbox — drained inline | yes |
Mailbox<M> |
Lock-free SPSC queue backing an actor | no |
ActorSystem |
Named actor registry with routing, dead letters, spawn | no |
Everything else lives upstream (rill-patchbay, Runtime with its lifecycle).
Usage
use ;
let system = new;
let mut actor = system.spawn;
let ref_a = actor.actor_ref;
ref_a.send;
actor.drain;
RT-safe?
send() — yes (lock-free, bounded queue).
receive() — depends on the calling thread (the actor decides).
route() / broadcast() — soft-RT only.
How not to grow into Pekko
Rule: if new functionality needs more than 10 lines in
ActorRef or ActorSystem, it probably does not belong here.
Move it upstream (rill-patchbay, rill-adrift).