🔗 Theta
An async actor framework for Rust
Overview
Theta is an ergonomic yet minimal and performant async actor framework which Rust deserves.
- Async
- An actor instance is a very thin wrapper around a
tokio::taskand two MPMC channels. ActorRefis just a MPMC sender.
- An actor instance is a very thin wrapper around a
- Built-in remote
- Distributed actor system powered by P2P network,
iroh. - Even
ActorRefcould be passed around network boundary as regular data in message. - Available with feature
remote.
- Distributed actor system powered by P2P network,
- Built-in monitoring
- "Monitor" suggested by Carl Hewitt's Actor Model is implemented as (possibly remote) monitoring feature.
- Available with feature
monitor.
- Built-in persistence
- Seamless respawn of actor from snapshot on file system, AWS S3 etc.
- Available with feature
persistence.
- WASM support (WIP)
- Compile to WebAssembly for running in browser or other WASM environments
Example
use ;
use *;
;
;
async
🚧 WIP
Theta is currently under active development and API is subject to change. Not yet recommended for any serious business.
Todo
- Factor out supervision as a optional feature
- Define lifetime behavior of exported actors (Currently, exported actor will never get dropped)
- Support full NodeAddr including Url format definition and sharing routing information between peers
- Network timeout constants
- Actor pool (task stealing with anonymous dynamic actors and MPMC)
License
Licensed under the MIT License.