Skip to main content

clm_rust_core/
lib.rs

1//! # CLM Rust Core Kernel
2//!
3//! High-performance, zero-cost abstraction computing substrate for the Cubical Logic Model (CLM).
4//! Implements Layers 0 through 5: Kenotic Core, CPN VM, Tri-Database CAS, Reticulum Mesh,
5//! Headless Gateway, and Epistemic Learning.
6
7#![allow(clippy::items_after_test_module)]
8#![allow(clippy::needless_borrow)]
9#![allow(clippy::useless_conversion)]
10#![allow(clippy::too_many_arguments)]
11#![allow(clippy::type_complexity)]
12#![allow(clippy::manual_strip)]
13#![allow(clippy::collapsible_if)]
14#![allow(clippy::if_same_then_else)]
15#![allow(clippy::should_implement_trait)]
16#![allow(clippy::format_in_format_args)]
17#![allow(clippy::unnecessary_unwrap)]
18#![allow(clippy::regex_creation_in_loops)]
19#![allow(clippy::bool_assert_comparison)]
20#![allow(clippy::needless_range_loop)]
21#![allow(clippy::explicit_counter_loop)]
22#![allow(clippy::result_large_err)]
23#![allow(clippy::missing_safety_doc)]
24#![allow(clippy::unnecessary_sort_by)]
25
26use std::sync::atomic::AtomicUsize;
27
28pub static TEMP_COUNTER: AtomicUsize = AtomicUsize::new(0);
29
30
31// WASM-safe core modules always available
32#[path = "layer0/error.rs"]
33pub mod error;
34#[cfg(feature = "native")]
35#[path = "layer0/mime.rs"]
36pub(crate) mod mime;
37pub mod types;
38#[path = "layer0/hash_registry.rs"]
39pub mod hash;
40pub mod layer0;
41pub mod cross_cutting;
42pub mod layer1;
43pub mod layer2;
44#[cfg(feature = "native")]
45pub mod layer3;
46pub mod layer4;
47pub mod layer5;
48#[path = "layer0/handle_kind.rs"]
49pub mod handle_kind;
50#[cfg(any(feature = "native", feature = "db"))]
51#[path = "layer2/tape.rs"]
52pub mod tape;
53#[path = "layer0/utils.rs"]
54pub mod utils;
55#[path = "layer0/type_lattice.rs"]
56pub mod type_lattice;
57#[path = "layer0/type_interpreter.rs"]
58pub mod type_interpreter;
59#[path = "layer0/typed_value.rs"]
60pub mod typed_value;
61#[cfg(feature = "native")]
62#[path = "layer3/tss.rs"]
63pub mod tss;
64#[path = "layer2/sheaf.rs"]
65pub mod sheaf;
66#[cfg(feature = "native")]
67#[path = "layer4/epiplexity.rs"]
68pub mod epiplexity;
69
70
71#[path = "layer2/okf_adapter.rs"]
72pub mod okf_adapter;
73#[path = "layer1/runtime_adapter.rs"]
74pub mod runtime_adapter;
75#[path = "layer0/signing_provider.rs"]
76pub mod signing_provider;
77#[path = "layer2/crdt.rs"]
78pub mod crdt;
79#[cfg(feature = "native")]
80#[path = "layer3/federation.rs"]
81pub mod federation;
82#[cfg(feature = "native")]
83#[path = "layer4/substrate.rs"]
84pub mod substrate;
85#[path = "layer3/identity_registry.rs"]
86pub mod identity;
87#[cfg(feature = "native")]
88#[path = "layer3/auth_namespace.rs"]
89pub mod auth_namespace;
90#[cfg(feature = "native")]
91#[path = "layer3/auth_did.rs"]
92pub mod auth_did;
93#[cfg(feature = "native")]
94#[path = "layer3/auth_oidc.rs"]
95pub mod auth_oidc;
96#[cfg(feature = "native")]
97#[path = "layer4/payment.rs"]
98pub mod payment;
99#[cfg(feature = "native")]
100#[path = "layer2/observability.rs"]
101pub mod observability;
102#[cfg(feature = "native")]
103pub mod telemetry;
104#[cfg(feature = "native")]
105#[path = "layer2/backup.rs"]
106pub mod backup;
107#[cfg(feature = "native")]
108#[path = "layer4/tokens.rs"]
109pub mod tokens;
110
111#[cfg(feature = "native")]
112#[path = "layer1/parser.rs"]
113pub mod parser;
114#[cfg(feature = "native")]
115#[path = "layer0/jsonl.rs"]
116pub mod jsonl;
117
118#[cfg(feature = "native")]
119#[path = "layer0/yaml.rs"]
120pub mod yaml;
121
122#[cfg(feature = "native")]
123#[path = "layer1/runtime_dispatch.rs"]
124pub mod runtime_dispatch;
125
126#[cfg(feature = "native")]
127#[path = "layer0/cache.rs"]
128pub mod cache;
129#[cfg(feature = "native")]
130#[path = "layer0/classifier.rs"]
131pub mod classifier;
132#[cfg(any(feature = "native", feature = "db"))]
133#[path = "layer2/db.rs"]
134pub mod db;
135#[cfg(any(feature = "native", feature = "db"))]
136#[path = "layer0/fs_utils.rs"]
137pub mod fs_utils;
138#[cfg(feature = "native")]
139#[path = "layer0/sys_ffi.rs"]
140pub mod sys_ffi;
141#[cfg(feature = "native")]
142#[path = "layer0/memorize.rs"]
143pub mod memorize;
144pub mod cpn;
145
146
147
148
149
150#[cfg(feature = "native")]
151#[path = "layer0/baldwin.rs"]
152pub mod baldwin;
153#[cfg(feature = "native")]
154#[path = "layer2/normalizer.rs"]
155pub mod normalizer;
156#[cfg(feature = "native")]
157#[path = "layer0/mcard_encoder.rs"]
158pub mod mcard_encoder;
159#[cfg(feature = "native")]
160#[path = "layer3/discovery_engine.rs"]
161pub mod discovery_engine;
162#[cfg(feature = "native")]
163#[path = "layer3/wireguard.rs"]
164pub mod wireguard;
165#[cfg(feature = "native")]
166#[path = "layer3/quic_transport.rs"]
167pub mod quic_transport;
168#[cfg(feature = "native")]
169#[path = "layer3/network_gateway.rs"]
170pub mod network_gateway;
171#[cfg(feature = "native")]
172pub mod evaluator;
173#[cfg(feature = "native")]
174#[path = "layer4/prove.rs"]
175pub mod prove;
176#[cfg(feature = "native")]
177pub mod integration;
178#[cfg(feature = "native")]
179pub mod polyglot;
180#[cfg(feature = "native")]
181#[path = "layer1/invariants.rs"]
182pub mod invariants;
183#[cfg(feature = "native")]
184#[path = "layer4/compile.rs"]
185pub mod compile;
186#[cfg(feature = "native")]
187#[path = "layer2/directory_ingest.rs"]
188pub mod directory_ingest;
189#[cfg(feature = "native")]
190#[path = "layer2/manifest.rs"]
191pub mod manifest;
192#[cfg(feature = "native")]
193#[path = "layer2/archive.rs"]
194pub mod archive;
195#[cfg(feature = "native")]
196pub mod mesh;
197
198#[cfg(feature = "fiber")]
199pub mod fiber;
200#[cfg(feature = "native")]
201pub mod agent;
202#[cfg(feature = "native")]
203pub mod services;
204pub mod satori;
205#[path = "layer0/domain.rs"]
206pub mod domain;
207
208
209
210#[cfg(any(feature = "native", feature = "db"))]
211#[path = "layer4/mcard_fs.rs"]
212pub mod mcard_fs;
213
214#[path = "layer4/prelude.rs"]
215pub mod prelude;
216pub use prelude::*;
217
218pub use error::{ClmError, Result};
219
220#[cfg(feature = "native")]
221pub use evaluator::run_evaluation;
222#[cfg(any(feature = "native", feature = "db"))]
223pub use db::DatabaseSandboxGuard;
224
225// Sprint 494 (DP-5): Explicit compatibility re-exports for relocated module cohorts
226pub use cross_cutting::context::{
227    CLMContext, CLMContextOverrides, ProcessSpawner, RejectingProcessSpawner,
228    SovereignSubprocessForbiddenError,
229};
230pub use layer0::runtime_contract::{ClmEnvVar, ClmExitCode, SQLITE_DDL_V3_1};
231#[cfg(feature = "native")]
232pub use evaluator::dispatch::catalog::CoreDispatchRegistry;
233
234#[path = "layer4/c_abi.rs"]
235pub mod c_abi;
236
237#[cfg(feature = "python")]
238#[path = "layer4/pyo3_bindings.rs"]
239pub mod pyo3_bindings;
240
241
242
243