clm-kernel 0.0.23

Cubical Logic Model (CLM) sovereign execution engine, CPN-VM, and Cordis spatiotemporal substrate
Documentation
//! # CLM Rust Core Kernel
//!
//! High-performance, zero-cost abstraction computing substrate for the Cubical Logic Model (CLM).
//! Implements Layers 0 through 5: Kenotic Core, CPN VM, Tri-Database CAS, Reticulum Mesh,
//! Headless Gateway, and Epistemic Learning.

#![allow(clippy::items_after_test_module)]
#![allow(clippy::needless_borrow)]
#![allow(clippy::useless_conversion)]
#![allow(clippy::too_many_arguments)]
#![allow(clippy::type_complexity)]
#![allow(clippy::manual_strip)]
#![allow(clippy::collapsible_if)]
#![allow(clippy::if_same_then_else)]
#![allow(clippy::should_implement_trait)]
#![allow(clippy::format_in_format_args)]
#![allow(clippy::unnecessary_unwrap)]
#![allow(clippy::regex_creation_in_loops)]
#![allow(clippy::bool_assert_comparison)]
#![allow(clippy::needless_range_loop)]
#![allow(clippy::explicit_counter_loop)]
#![allow(clippy::result_large_err)]
#![allow(clippy::missing_safety_doc)]
#![allow(clippy::unnecessary_sort_by)]

use std::sync::atomic::AtomicUsize;

pub static TEMP_COUNTER: AtomicUsize = AtomicUsize::new(0);


// WASM-safe core modules always available
#[path = "layer0/error.rs"]
pub mod error;
#[cfg(feature = "native")]
#[path = "layer0/mime.rs"]
pub(crate) mod mime;
pub mod types;
#[path = "layer0/hash_registry.rs"]
pub mod hash;
pub mod layer0;
pub mod cross_cutting;
pub mod layer1;
pub mod layer2;
#[cfg(feature = "native")]
pub mod layer3;
pub mod layer4;
pub mod layer5;
#[path = "layer0/handle_kind.rs"]
pub mod handle_kind;
#[cfg(any(feature = "native", feature = "db"))]
#[path = "layer2/tape.rs"]
pub mod tape;
#[path = "layer0/utils.rs"]
pub mod utils;
#[path = "layer0/type_lattice.rs"]
pub mod type_lattice;
#[path = "layer0/type_interpreter.rs"]
pub mod type_interpreter;
#[path = "layer0/typed_value.rs"]
pub mod typed_value;
#[cfg(feature = "native")]
#[path = "layer3/tss.rs"]
pub mod tss;
#[path = "layer2/sheaf.rs"]
pub mod sheaf;
#[cfg(feature = "native")]
#[path = "layer4/epiplexity.rs"]
pub mod epiplexity;


#[path = "layer2/okf_adapter.rs"]
pub mod okf_adapter;
#[path = "layer1/runtime_adapter.rs"]
pub mod runtime_adapter;
#[path = "layer0/signing_provider.rs"]
pub mod signing_provider;
#[path = "layer2/crdt.rs"]
pub mod crdt;
#[cfg(feature = "native")]
#[path = "layer3/federation.rs"]
pub mod federation;
#[cfg(feature = "native")]
#[path = "layer4/substrate.rs"]
pub mod substrate;
#[path = "layer3/identity_registry.rs"]
pub mod identity;
#[cfg(feature = "native")]
#[path = "layer3/auth_namespace.rs"]
pub mod auth_namespace;
#[cfg(feature = "native")]
#[path = "layer3/auth_did.rs"]
pub mod auth_did;
#[cfg(feature = "native")]
#[path = "layer3/auth_oidc.rs"]
pub mod auth_oidc;
#[cfg(feature = "native")]
#[path = "layer4/payment.rs"]
pub mod payment;
#[cfg(feature = "native")]
#[path = "layer2/observability.rs"]
pub mod observability;
#[cfg(feature = "native")]
pub mod telemetry;
#[cfg(feature = "native")]
#[path = "layer2/backup.rs"]
pub mod backup;
#[cfg(feature = "native")]
#[path = "layer4/tokens.rs"]
pub mod tokens;

#[cfg(feature = "native")]
#[path = "layer1/parser.rs"]
pub mod parser;
#[cfg(feature = "native")]
#[path = "layer0/jsonl.rs"]
pub mod jsonl;

#[cfg(feature = "native")]
#[path = "layer0/yaml.rs"]
pub mod yaml;

#[cfg(feature = "native")]
#[path = "layer1/runtime_dispatch.rs"]
pub mod runtime_dispatch;

#[cfg(feature = "native")]
#[path = "layer0/cache.rs"]
pub mod cache;
#[cfg(feature = "native")]
#[path = "layer0/classifier.rs"]
pub mod classifier;
#[cfg(any(feature = "native", feature = "db"))]
#[path = "layer2/db.rs"]
pub mod db;
#[cfg(any(feature = "native", feature = "db"))]
#[path = "layer0/fs_utils.rs"]
pub mod fs_utils;
#[cfg(feature = "native")]
#[path = "layer0/sys_ffi.rs"]
pub mod sys_ffi;
#[cfg(feature = "native")]
#[path = "layer0/memorize.rs"]
pub mod memorize;
pub mod cpn;





#[cfg(feature = "native")]
#[path = "layer0/baldwin.rs"]
pub mod baldwin;
#[cfg(feature = "native")]
#[path = "layer2/normalizer.rs"]
pub mod normalizer;
#[cfg(feature = "native")]
#[path = "layer0/mcard_encoder.rs"]
pub mod mcard_encoder;
#[cfg(feature = "native")]
#[path = "layer3/discovery_engine.rs"]
pub mod discovery_engine;
#[cfg(feature = "native")]
#[path = "layer3/wireguard.rs"]
pub mod wireguard;
#[cfg(feature = "native")]
#[path = "layer3/quic_transport.rs"]
pub mod quic_transport;
#[cfg(feature = "native")]
#[path = "layer3/network_gateway.rs"]
pub mod network_gateway;
#[cfg(feature = "native")]
pub mod evaluator;
#[cfg(feature = "native")]
#[path = "layer4/prove.rs"]
pub mod prove;
#[cfg(feature = "native")]
pub mod integration;
#[cfg(feature = "native")]
pub mod polyglot;
#[cfg(feature = "native")]
#[path = "layer1/invariants.rs"]
pub mod invariants;
#[cfg(feature = "native")]
#[path = "layer4/compile.rs"]
pub mod compile;
#[cfg(feature = "native")]
#[path = "layer2/directory_ingest.rs"]
pub mod directory_ingest;
#[cfg(feature = "native")]
#[path = "layer2/manifest.rs"]
pub mod manifest;
#[cfg(feature = "native")]
#[path = "layer2/archive.rs"]
pub mod archive;
#[cfg(feature = "native")]
pub mod mesh;

#[cfg(feature = "fiber")]
pub mod fiber;
#[cfg(feature = "native")]
pub mod agent;
#[cfg(feature = "native")]
pub mod services;
pub mod satori;
#[path = "layer0/domain.rs"]
pub mod domain;



#[cfg(any(feature = "native", feature = "db"))]
#[path = "layer4/mcard_fs.rs"]
pub mod mcard_fs;

#[path = "layer4/prelude.rs"]
pub mod prelude;
pub use prelude::*;

pub use error::{ClmError, Result};

#[cfg(feature = "native")]
pub use evaluator::run_evaluation;
#[cfg(any(feature = "native", feature = "db"))]
pub use db::DatabaseSandboxGuard;

// Sprint 494 (DP-5): Explicit compatibility re-exports for relocated module cohorts
pub use cross_cutting::context::{
    CLMContext, CLMContextOverrides, ProcessSpawner, RejectingProcessSpawner,
    SovereignSubprocessForbiddenError,
};
pub use layer0::runtime_contract::{ClmEnvVar, ClmExitCode, SQLITE_DDL_V3_1};
#[cfg(feature = "native")]
pub use evaluator::dispatch::catalog::CoreDispatchRegistry;

#[path = "layer4/c_abi.rs"]
pub mod c_abi;

#[cfg(feature = "python")]
#[path = "layer4/pyo3_bindings.rs"]
pub mod pyo3_bindings;