moirai-core 0.6.0

Core abstractions and traits for the Moirai concurrency library
Documentation

moirai-core

crates.io docs.rs

Core abstractions for the Moirai concurrency library: the task, executor, and scheduler traits every other Moirai crate builds on, plus the channel, communication, memory-pool, and coroutine primitives they share.

Modules: task, executor, scheduler, error, channel, communication, memory, pool, coroutine, ipc, platform.

[dependencies]
moirai-core = "0.5"
use moirai_core::channel::spsc;

// Bounded lock-free single-producer/single-consumer ring.
let (tx, rx) = spsc::<u32>(1024);
tx.send(42).unwrap();
assert_eq!(rx.recv().unwrap(), 42);

Most users depend on the moirai-runtime facade instead, which re-exports the parts of this crate that make up the public runtime surface.

Full documentation: https://docs.rs/moirai-core

License

Licensed under either of Apache-2.0 or MIT at your option.