icydb_core/lib.rs
1//! Module: lib
2//! Responsibility: crate root for the IcyDB core runtime surface.
3//! Does not own: canister-facing facade APIs from the public `icydb` crate.
4//! Boundary: exposes the engine subsystems used by schema, query, executor, and storage layers.
5
6//! Core runtime for IcyDB: accepted-schema execution, values, storage, and
7//! the low-level vocabulary exported through the facade.
8#![warn(unreachable_pub)]
9// The no-default test target intentionally type-checks shared test/helper
10// surfaces whose consuming tests live behind SQL. Keep production and
11// all-features dead-code linting strict.
12#![cfg_attr(
13 all(test, not(feature = "sql")),
14 expect(dead_code, reason = "shared test helpers have SQL consumers")
15)]
16// The base build owns the complete engine-neutral planner/executor substrate.
17// SQL is an optional frontend over that substrate and is currently the only
18// consumer of some SQL explain, diagnostic, and frontend-extension capabilities,
19// so those internal extension points are intentionally dormant without SQL.
20#![cfg_attr(
21 all(not(test), not(feature = "sql")),
22 expect(
23 dead_code,
24 reason = "SQL-only explain, diagnostic, and frontend-extension capabilities remain intentionally dormant in base builds"
25 )
26)]
27
28extern crate self as icydb;
29
30#[macro_use]
31pub(crate) mod scalar_registry;
32
33// public exports are one module level down
34pub mod db;
35pub mod error;
36pub mod metrics;
37pub(crate) mod runtime;
38pub mod traits;
39pub mod types;
40pub mod value;
41
42#[cfg(test)]
43pub(crate) mod testing;
44
45///
46/// CONSTANTS
47///
48
49/// Maximum number of indexed fields allowed on an entity.
50///
51/// This limit keeps hashed index keys within bounded, storable sizes and
52/// simplifies sizing tests in the stores.
53pub const MAX_INDEX_FIELDS: usize = 4;
54
55///
56/// Prelude
57///
58/// Prelude contains only domain vocabulary.
59/// No errors, executors, stores, serializers, or helpers are re-exported here.
60///
61
62pub mod prelude {
63 pub use crate::{
64 traits::Path,
65 value::{InputValue, OutputValue},
66 };
67}