calandria 0.0.1-rc.2

Bounded reactor framework for explicit single-owner systems
Documentation
  • Coverage
  • 100%
    275 out of 275 items documented0 out of 50 items with examples
  • Size
  • Source code size: 444.9 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 5.7 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • zsumz/calandria
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • zsumz

calandria

Bounded reactor primitives with explicit ownership and deterministic progress.

calandria provides the runtime-neutral core: bounded turns, hosting, mailboxes, timers, resource identities, lifecycle, and dedicated reactor ownership.

[dependencies]
calandria = "=0.0.1-rc.2"
use core::convert::Infallible;
use calandria::{Duty, Moment, Turn, WorkCount};

#[derive(Debug)]
struct Worker {
    remaining: u64,
}

impl Duty for Worker {
    type Error = Infallible;

    fn turn(&mut self, _now: Moment) -> Result<Turn, Self::Error> {
        if self.remaining == 0 {
            return Ok(Turn::stopped(WorkCount::ZERO));
        }

        self.remaining -= 1;
        Ok(Turn::runnable(WorkCount::new(1)))
    }
}

Each machine and resource has one mutable owner. Retained work is bounded, and terminal states remain explicit. Calandria does not provide an async runtime, a general executor, or protocol policy.

Repository · API documentation