#channels #async #actor #utils


A midground between channels and actors

3 releases

0.1.2 Aug 4, 2020
0.1.1 Aug 4, 2020
0.1.0 Aug 4, 2020

#480 in Rust patterns

25 downloads per month

MIT license

163 lines

Messages. Convenient asynchronous communication

Status: CI

Project info: Docs.rs Latest Version License Rust 1.44+ required


messages is a very simplistic library, which provides a more declarative interface than raw channels, but yet not overcomplicates things with too much functionality.

It is intended to be used when channels in your project start looking a bit messy, but you aren't sure that migrating to the actor framework is a right choice.

To compare channels-based implementation and the implementation that uses messages, see:


When your code has a plenty of channels (both mpsc and oneshot) it becomes hard to keep all of them in mind. More than that, since there are mpsc::Sender / oneshot::Sender (and same for Receiver), you either have to use type with module prefixes, or live with uncertainty.

This crate attempts to simplify things for users. There is no more need to think about types of channels: oneshot ones are hidden in Request objects, and mpsc lies inside Mailbox / Address. Every type name is unique and hard to misinterpret.

Hopefully, it may help to make code more readable.


All kind of contributions is really appreciated!


messages library is licensed under the MIT License. See LICENSE for details.


~37K SLoC