rustclamp-kernel 1.0.0

Composition and capability resolution for RustClamp applications.
Documentation
  • Coverage
  • 100%
    219 out of 219 items documented1 out of 119 items with examples
  • Size
  • Source code size: 165.2 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.6 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 1s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • rustclamp/kernel
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Nejcc github:rustclamp:owners

rustclamp-kernel

Kernel component of RustClamp: composition, typed capability resolution and process validation over rustclamp-core. Depends only on Core, no other external crates. Companion crate, not a standalone framework.

Install

Rust 1.96.1+, edition 2024:

[dependencies]
rustclamp-kernel = "1"

Example

Pick a Clock provider explicitly or let a single provider win (see examples/02-resolution.rs):

use rustclamp_core::{Clock, ClockCapability, ModuleId, SystemClock};
use rustclamp_kernel::{Provision, Resolver};

const GREETER: ModuleId = ModuleId::new("example.greeter");
const SYSTEM_CLOCK: ModuleId = ModuleId::new("example.system-clock");

let system = SystemClock;
let providers = [Provision::<ClockCapability>::new(SYSTEM_CLOCK, &system as &dyn Clock)];
let clock = Resolver::resolve::<ClockCapability>(GREETER, &providers, None)?;

Main API

  • Resolution: Resolver, Provision, QualifiedProvision, CapabilityRequirement, ProviderSelection; optional and many cardinality, structured CompositionError.
  • Planning snapshots: CapabilityComposition (without_module, replace_provider, validate), ConstructionGraph (cycle detection with closed module paths).
  • Contributions: TargetComposition<T, Q> hands typed contributions to a Core ContributionTarget.
  • Process projection: ApplicationBlueprint (add_root, project, freeze) resolves only what a process reaches, with inclusion and exclusion reasons. freeze consumes the blueprint into a FrozenProcess:
    • resolve, resolve_shared (owned Arc via SharedProvision), resolve_with (lazy FactoryProvision, fallible with FactoryError);
    • compose / compose_inferred build a contribution target from the frozen process (ComposeError).

Kernel does not construct modules or manage lifecycle; that is runtime. Feature flags: none. Benchmarks: cargo bench (resolution, process_projection); measurements are in the facade evidence. See CHANGELOG.md.

Documentation

https://docs.rustclamp.com

Development

cargo fmt --all -- --check
cargo clippy --offline --locked --all-targets --all-features -- -D warnings
cargo test --offline --locked --all-features
RUSTDOCFLAGS="-D warnings" cargo doc --offline --locked --no-deps --all-features

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.