clm-kernel (0.0.21, Rust crate clm_rust_core)
clm-kernel (library target clm_rust_core) is the Rust 2024 microkernel for the Cubical Logic Model (CLM). It implements content-addressed MCard storage, BLAKE3 g_time provenance, bitset PlaceTypeLattice inference, Colored Petri Net execution, Cellular Sheaf Cohomology, and PyO3 acceleration bindings.
Cargo features
Cargo.toml defines composable feature flags so downstream crates and WebAssembly targets compile only the layers they need:
core: Minimal zero-network, zero-database core (BLAKE3hashing,MCard/PCard/VCard,TypeLattice,PlaceTypeLattice,ColoredPetriVM, Open Petri Pullback, Sheaf Cohomology, and bialgebraic bisimulation). Compiles cleanly forwasm32-unknown-unknownwith--no-default-features --features core.fiber: CordisFibercontext isolation,DisposableList, andSavepointGuard.crdt: Vector clocks, G-Set handle history, andSyncContract v1state convergence.db: Dual-pool SQLite storage (rusqliteWAL mode, statement cache, andSqlSavepointPool).bundled-sqlite: Compiles SQLite from source alongsidedb.async: Tokio asynchronous task runtime.net: QUIC (quinn) and mDNS (mdns-sd) Satori mesh transport.native(default): Enablescore,crdt,fiber,db,async, andnet.full: Alias for the completenativeprofile.python: PyO3 extension bindings (clm_rust_corenative module forclm_py_core).
Usage
Add clm-kernel 0.0.21 to Cargo.toml (the library crate name is clm_rust_core):
[]
= { = "0.0.21", = false, = ["core", "fiber"] }
For wasm32-unknown-unknown builds, enable only core:
Quick start
use *;
Contract parameters
clm_rust_core::layer0::parameter_context::ParameterContext holds the contract's typed parameters, generated from the CLM runtime contract alongside the layer0::vocabulary* constant modules. from_mapping resolves CLI (contract keys) over environment (CLM_* names) over the contract default and returns ParameterBoundaryError for a value outside its refinement:
use BTreeMap;
use ParameterContext;
Production dispatch matches canonical catalog ids (evaluator::dispatch::catalog_ids::OP_*, resolved from module paths and operation names by op_id_for); an id with no handler is DispatchError::Unbound, raised before any receipt or store write.
CLI binaries
Building with default (native) features produces two binaries:
clm_rust_core: FullclmEvalCLI evaluator, conformance runner, and formal oracle dispatcher.clm_version_cli: Zero-framework fast version binary dispatched by./clmEval version.
License
MIT License. Source code, formal proofs, and Python and TypeScript kernels live in the CLM repository.