Hannibal
a small actor library
Why
Credit where credit is due: Hannibal is a fork of the excellent Xactor which unfortunately received very little interest by its original maintainer recently.
Documentation
- GitHub repository
- Cargo package
- Minimum supported Rust version: 1.56 or later
Features
- Async actors.
- Actor communication in a local context.
- Using Futures for asynchronous message handling.
- Typed messages (No
Anytype). Generic messages are allowed.
Examples
use *;
;
;
async
Installation
Hannibal requires async-trait on userland.
With cargo add installed, run:
We also provide the tokio runtime instead of async-std. To use it, you need to activate runtime-tokio and disable default features.
You can edit your Cargo.toml as follows:
= { = "x.x.x", = ["runtime-tokio"], = false }