4 releases

Uses old Rust 2015

0.1.3 Feb 3, 2019
0.1.2 Feb 2, 2019
0.1.1 Feb 2, 2019
0.1.0 Feb 2, 2019

#21 in #dynamic-dispatch

MIT and maybe AGPL-3.0

54KB
691 lines

message-dispatch

message-dispatch is a Rust crate that provides dynamic dispatch support for messages of different types and sizes sent from one thread to another (or back to the same thread) without the need to use trait objects.

Internally it uses a lock-free, multi-producer, single consumer Magic (or Virtual) Ring Buffer.

As such, the only cost involved in dispatch is the cost of an indirect call.

It could even be used to send messages across POSIX message queues if so desired.

Licensing

The license for this project is MIT.


lib.rs:

#message-dispatch

This provides dynamic dispatch support for messages of different types and sizes sent from one thread to another (or back to the same thread) without the need to use trait objects.

As such, the only cost involved in dispatch is the cost of an indirect call.

It could even be used to send messages across POSIX message queues if so desired.

Currently only implemented for Android and Linux until the underlying magic ring buffer used gains support for more Operating Systems.

Dependencies

~0–1.1MB
~16K SLoC