Skip to main content

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 or diagnostics
11// features. Keep production and all-features dead-code linting strict.
12#![cfg_attr(
13    all(test, not(feature = "sql")),
14    expect(
15        dead_code,
16        reason = "shared test helpers have SQL and diagnostics consumers"
17    )
18)]
19// The base build owns the complete engine-neutral planner/executor substrate.
20// SQL is an optional frontend over that substrate and is currently the only
21// consumer of some SQL explain, diagnostic, and frontend-extension capabilities,
22// so those internal extension points are intentionally dormant without SQL.
23#![cfg_attr(
24    all(not(test), not(feature = "sql")),
25    expect(
26        dead_code,
27        reason = "SQL-only explain, diagnostic, and frontend-extension capabilities remain intentionally dormant in base builds"
28    )
29)]
30
31extern crate self as icydb;
32
33#[macro_use]
34pub(crate) mod scalar_registry;
35
36// public exports are one module level down
37pub mod db;
38pub mod error;
39pub mod metrics;
40pub(crate) mod runtime;
41pub mod traits;
42pub mod types;
43pub mod value;
44
45#[cfg(test)]
46pub(crate) mod testing;
47
48///
49/// CONSTANTS
50///
51
52/// Maximum number of indexed fields allowed on an entity.
53///
54/// This limit keeps hashed index keys within bounded, storable sizes and
55/// simplifies sizing tests in the stores.
56pub const MAX_INDEX_FIELDS: usize = 4;
57
58///
59/// Prelude
60///
61/// Prelude contains only domain vocabulary.
62/// No errors, executors, stores, serializers, or helpers are re-exported here.
63///
64
65pub mod prelude {
66    pub use crate::{
67        traits::Path,
68        value::{InputValue, OutputValue},
69    };
70}