Canwu provides
- Deterministic time, independent of frame rate
- Command ingress and causal events
- Entity and domain-record registries
- Plugin-owned typed state, settled at boundaries
Integration patterns
01Games · APIs available
canwu.enqueue_command(time, priority, request)?;
canwu.advance_canonical(SimDuration::hours(1))?;
let record = canwu.typed_domain_record(&game_state_ref); // Option<&DomainRecord>
let events = canwu.events();02Research · Fork and replay available
let saved = canwu.snapshot_json()?;
let branch = canwu.fork();
let journal = canwu.replay_journal();
let replayed = Canwu::replay_from_journal(plugins, &journal)?;
assert_eq!(replayed.checkpoint_hash(), canwu.checkpoint_hash());03Agents · Per-character loop available
let view = canwu.viewer_for_actor(actor)?.query_knowledge(&query)?;
canwu.enqueue_command(time, priority, request)?;
canwu.advance_canonical(duration)?;
let changes = canwu.viewer_for_actor(actor)?.visible_changes_since(time);04Education · APIs available
entities() → stable identities
domain projection → timeline or map state
events() → causal history
fork() → what-if branch