Actor‑rs is a Rust implementation of the actor model, offering a lightweight and efficient framework for building concurrent systems. It is part of the Cocapn Fleet (github.com/SuperInstance).
- Provides core primitives (
Actor,Message,Supervisor, …) to create isolated, message‑driven components. - Leverages Rust’s ownership and type system for safety without a runtime.
- Includes examples, documentation, and a small research folder with performance notes.
Add the crate to your project:
# Cargo.toml
[dependencies]
actor-rs = "0.1.0"// src/main.rs
use actor_rs::{Actor, Context, Message};
struct Ping;
impl Message for Ping {}
struct Pong;
impl Actor for Pong {
type Msg = Ping;
fn receive(&mut self, _msg: Ping, _ctx: &mut Context<Self>) {
println!("Pong received Ping");
}
}Run cargo doc --open for full API docs.
- Cocapn Fleet – the umbrella project: https://github.com/SuperInstance
- Actor model overview: https://en.wikipedia.org/wiki/Actor_model
- Other Rust actor libraries (e.g.,
actix,riker) for comparison.
See the LICENSE file for details.
- Title & Header: Clearly state the repository name and its purpose.
- Description: Summarizes key features and the context within the Cocapn Fleet, giving users a quick understanding of what the crate provides.
- Usage: Shows the minimal steps to add the crate and a tiny code snippet that demonstrates the core API, satisfying the “usage” requirement without overwhelming detail.
- Related: Links to the parent organization and to general actor‑model resources, fulfilling the “related” section.
- License: Direct reference to the LICENSE file, a common practice for open‑source projects.
- Formatting: Kept under 30 lines for the core README portion; the additional “Reasoning” section is provided separately but still in markdown, as requested.