Skip to main content

Crate cardbox

Crate cardbox 

Source
Expand description

The project as a library: the Rust host, the Teal modules embedded beside it, and preload, which hands both to an Htl. Every entry point — the binary, a test, another crate embedding this one — goes through preload.

The split this crate is built on: Rust is mechanism, Teal is policy. store owns the IO, the transaction, the invariant that must hold at the instant a write lands, and the exactly-once fold that keeps the read models in step with the log; which kinds exist, what a card is called, what a card may be filtered on and how a refusal is worded are the Teal side’s, where changing them costs no rebuild.

Re-exports§

pub use store::json::Value;
pub use store::Blob;
pub use store::Recorded;
pub use store::Store;

Modules§

store
The mechanism: one eventsdb log, one blob directory, and the read models built from the first, exposed to Teal as require("store").

Functions§

preload
Register what this crate provides on a fresh Htl: the Rust store module opened on root, htl’s own native modules as require("std.*"), the dependency as require("htlx.list"), then the Teal modules as require("cardbox.find"), require("cardbox.alias"), require("cardbox.prune"), require("cardbox.cards"), require("cardbox") and require("cardbox.cli").