
Every car, junction, traffic light and district in this city is a Picard actor. Spawn thousands of vehicles, crash an actor and watch supervision restart it, or add a whole district at runtime. The simulation runs entirely in your browser: Picard compiled to WebAssembly, no server involved.
Launch the demo
1use picard::actors::*;23#[derive(Default)]4struct MyActor;56impl Actor for MyActor {7 type Msg = String;89 fn recv(&mut self, _ctx: &Context<Self::Msg>, msg: Self::Msg, _sender: Sender) {10 println!("received {msg}");11 }12}1314fn main() {15 let sys = ActorSystem::new().unwrap();16 let actor = sys.actor_of::<MyActor>("my-actor").unwrap();1718 actor.tell("Hello actor!".to_string(), None);19}20