rakka-core
Idiomatic Rust port of akka.net/src/core/Akka.
Public modules mirror the upstream folder layout 1:1 to make tracking
upstream changes tractable. See PORTING.md at the workspace root.
Quick start
use rakka_core::prelude::*;
#[derive(Default)]
struct Echo;
#[async_trait::async_trait]
impl Actor for Echo {
type Msg = String;
async fn handle(&mut self, _ctx: &mut Context<Self>, msg: String) {
println!("echo: {msg}");
}
}
# async fn run() -> Result<(), Box<dyn std::error::Error>> {
let sys = ActorSystem::create("S", rakka_config::Config::reference()).await?;
let echo = sys.actor_of(Props::create(Echo::default), "echo")?;
echo.tell("hi".to_string());
sys.terminate().await;
# Ok(()) }