locus (0.1.1)

Published 2026-07-30 12:55:49 +00:00 by PerishFire

Installation

[registries.forgejo]
index = "sparse+" # Sparse index
# index = "" # Git

[net]
git-fetch-with-cli = true
cargo add locus@0.1.1 --registry forgejo

About this package

Readonly context and immutable observation substrate

locus

Readonly context and immutable observation substrate.

Locus accepts one candidate record, resolves requested semantic roles, returns a new immutable context view, and independently drives configured reporting. Trace and span are ordinary roles over the same record stream.

use locus::{Candidate, Config, Context, Engine, Policy, Role};
use serde_json::json;

let engine = Engine::bootstrap(Config::new(Policy::default()))?;
let context = Context::empty();
let trace = Role::trace();

let accepted = locus::record!(
    &engine,
    &context,
    Candidate::event(json!({"event": "cli.start"})).ensure(trace),
)?;

let context = accepted.context();
# Ok::<(), locus::Error>(())

Canonical source: PerishLab/locus.

The cold-start contract is documented in docs/run/verify.md.

Dependencies

ID Version
getrandom ^0.3
locus-macro =0.1.1
serde ^1
serde_json ^1
Details
Cargo
2026-07-30 12:55:49 +00:00
39
MIT
14 KiB
Assets (1)
Versions (8) View all
0.2.2 2026-08-15
0.2.1 2026-08-02
0.2.0 2026-07-31
0.1.4 2026-07-31
0.1.3 2026-07-31