Part of the core-rebuild epic — follows the shared rigor contract there.
Component
src/message.rs (~456 LOC). Message<T> (handle), Context (reply channel + actor ref), the CQRS message-vs-query split, type-erased DynMessage/BoxMessage.
Learning & discussion
Local tier: T: Send + 'static, no serialization. A message gets exclusive &mut self, processed sequentially; the query path can run reads concurrently. Context is how a handler replies / stops.
Existing crates
downcast-rs, dyn-clone (already used) — evaluate keeping vs a leaner type-erasure.
Research — best algorithm/approach
Type-erased dynamic dispatch patterns; CQRS command/query separation and its concurrency benefit; zero-cost handler wiring.
Testing — hard as fuck
Sequence/protocol (handler ordering, reply-exactly-once), lifecycle, defensive boundary (wrong-type downcast must not UB). DST over interleaved message/query. Mutation: cargo-mutants, zero survivors.
Part of the core-rebuild epic — follows the shared rigor contract there.
Component
src/message.rs(~456 LOC).Message<T>(handle),Context(reply channel + actor ref), the CQRS message-vs-query split, type-erasedDynMessage/BoxMessage.Learning & discussion
Local tier:
T: Send + 'static, no serialization. A message gets exclusive&mut self, processed sequentially; the query path can run reads concurrently.Contextis how a handler replies / stops.Existing crates
downcast-rs,dyn-clone(already used) — evaluate keeping vs a leaner type-erasure.Research — best algorithm/approach
Type-erased dynamic dispatch patterns; CQRS command/query separation and its concurrency benefit; zero-cost handler wiring.
Testing — hard as fuck
Sequence/protocol (handler ordering, reply-exactly-once), lifecycle, defensive boundary (wrong-type downcast must not UB). DST over interleaved message/query. Mutation:
cargo-mutants, zero survivors.