CSPLib for concurrent programming

CSPLib is an implementation of Communicating Sequential Processes (CSP), a way of implementing “one shot” concurrent applications. With this library, you can implement applications like logic circuit or computational graph.

The core of the library is SPMC channel for message passing but for ease of use, this library provides code generating procedural macro. The following struct definition generates boilerplates

struct And {
    a: bool,
    b: bool,
    c: bool,

and user can focus on the implementation of the process logic.

async fn run_and(inner: AndInner) -> Result<()> {
    let a = inner.a.reader();
    let b = inner.b.reader();
    let (a, b) = tokio::try_join!(a.get(), b.get())?;
    let c = a & b;

If you like this library, please use in your projects. Thank you.