We will design and write a full-fledged actor framework in Rust from scratch—without third-party actor libraries, using only asynchronous Rust primitives. Starting with the basic Actor trait, we will build a runtime, mailbox, context, address system, and event, interruption, and request–response patterns step by step.
Along the way, we will explore key concurrency techniques: message passing through channels, trait-based polymorphism with async_trait, type-erased envelopes, lifecycle management through watch channels, and the Future trait for custom awaitable types. By the end, our framework supports events without responses, graceful interruption, and strictly typed request–response interaction, while the Calculator example confirms that everything works.