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
32pub mod error;
33pub(crate) mod mime;
34pub mod types;
35pub mod hash;
36pub mod layer0;
37#[cfg(feature = "native")]
38pub mod layer1;
39#[cfg(feature = "native")]
40pub mod layer2;
41#[cfg(feature = "native")]
42pub mod layer3;
43pub mod layer4;
44pub mod layer5;
45pub mod handle_kind;
46pub mod tape;
47pub mod utils;
48pub mod type_lattice;
49pub mod type_interpreter;
50pub mod typed_value;
51pub mod tss;
52pub mod sheaf;
53pub mod epiplexity;
54pub mod okf_adapter;
55pub mod runtime_adapter;
56pub mod signing_provider;
57pub mod crdt;
58#[cfg(feature = "native")]
59pub mod federation;
60#[cfg(feature = "native")]
61pub mod substrate;
62#[cfg(feature = "native")]
63pub mod identity;
64#[cfg(feature = "native")]
65pub mod auth_namespace;
66#[cfg(feature = "native")]
67pub mod auth_did;
68#[cfg(feature = "native")]
69pub mod auth_oidc;
70#[cfg(feature = "native")]
71pub mod payment;
72#[cfg(feature = "native")]
73pub mod observability;
74#[cfg(feature = "native")]
75pub mod telemetry;
76#[cfg(feature = "native")]
77pub mod backup;
78#[cfg(feature = "native")]
79pub mod tokens;
80
81#[cfg(feature = "native")]
82pub mod parser;
83#[cfg(feature = "native")]
84pub mod jsonl;
85
86#[cfg(feature = "native")]
87pub mod yaml;
88
89#[cfg(feature = "native")]
90pub mod runtime_dispatch;
91
92#[cfg(feature = "native")]
93pub mod cache;
94#[cfg(feature = "native")]
95pub mod classifier;
96#[cfg(any(feature = "native", feature = "db"))]
97pub mod db;
98#[cfg(any(feature = "native", feature = "db"))]
99pub mod fs_utils;
100#[cfg(feature = "native")]
101pub mod sys_ffi;
102#[cfg(feature = "native")]
103pub mod memorize;
104#[cfg(feature = "native")]
105pub mod cpn;
106#[cfg(feature = "native")]
107pub mod baldwin;
108#[cfg(feature = "native")]
109pub mod normalizer;
110#[cfg(feature = "native")]
111pub mod mcard_encoder;
112#[cfg(feature = "native")]
113pub mod discovery_engine;
114#[cfg(feature = "native")]
115pub mod wireguard;
116#[cfg(feature = "native")]
117pub mod quic_transport;
118#[cfg(feature = "native")]
119pub mod network_gateway;
120#[cfg(feature = "native")]
121pub mod evaluator;
122#[cfg(feature = "native")]
123pub mod prove;
124#[cfg(feature = "native")]
125pub mod integration;
126#[cfg(feature = "native")]
127pub mod polyglot;
128#[cfg(feature = "native")]
129pub mod invariants;
130#[cfg(feature = "native")]
131pub mod compile;
132#[cfg(feature = "native")]
133pub mod directory_ingest;
134#[cfg(feature = "native")]
135pub mod manifest;
136#[cfg(feature = "native")]
137pub mod archive;
138#[cfg(feature = "native")]
139pub mod mesh;
140
141#[cfg(any(target_arch = "wasm32", feature = "native"))]
142pub mod cpn_wasm;
143#[cfg(target_arch = "wasm32")]
144pub mod db_wasm;
145#[cfg(target_arch = "wasm32")]
146pub mod wasm_api;
147
148pub mod fiber;
149pub mod satori;
150pub mod domain;
151#[cfg(any(feature = "native", feature = "db"))]
152pub mod mcard_fs;
153
154pub mod prelude;
155pub use prelude::*;
156
157pub use error::{ClmError, Result};
158
159#[cfg(feature = "native")]
160pub use evaluator::run_evaluation;
161#[cfg(any(feature = "native", feature = "db"))]
162pub use db::DatabaseSandboxGuard;
163
164#[cfg(not(target_arch = "wasm32"))]
165pub mod c_abi;
166
167#[cfg(feature = "python")]
168pub mod pyo3_bindings;
169
170
171