rustclamp-core
Core component of RustClamp: minimal,
domain-neutral contracts shared by the other components. It defines contracts and
identities; resolution and runtime behavior live in
kernel and
runtime. No external dependencies on Unix (Windows adds getrandom for its random source), no
Tokio or async required. Companion crate, not a standalone framework.
Install
Rust 1.85+, edition 2024:
[]
= "1"
Example
use ;
use ;
let clock = new;
clock.advance;
let now = .now; // deterministic time for tests
Main API
- Time:
Clock(Send + Sync, so&dyn Clockmoves into threads and tasks),SystemClock,ManualClock(set,advance),ClockCapability. - Identity:
Reference(UUIDv7 naming a request, command or action;created_at,Reference::range),ModuleId,CapabilityId,QualifierId,ApplicationId,ProcessId,ExecutionId,ContributionId,ContributionTargetId. - Modules:
Module,Requires<C>,Provides<C>,Capability,Qualifier. - Contributions:
Contribution,ContributionTarget; each target owns validation and the runtime representation it builds. - Lifecycle:
LifecycleContextplus opt-inInitialize,Start,Ready,Drain,Stop; a module implements any subset.
Feature flags: none. See CHANGELOG.md.
Documentation
Development
RUSTDOCFLAGS="-D warnings"
Coordinated checkout, architecture checks and release policy: see the facade contributor guide.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option. Unless you state otherwise, any contribution you submit for inclusion is dual licensed as above, without additional terms or conditions.