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. 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;
36mod memory;
37pub mod metrics;
38mod retained;
39pub(crate) mod runtime;
40pub mod traits;
41pub mod types;
42pub mod value;
43
44#[cfg(test)]
45pub(crate) mod testing;
46
47///
48/// CONSTANTS
49///
50
51/// Maximum number of indexed fields allowed on an entity.
52///
53/// This limit keeps hashed index keys within bounded, storable sizes and
54/// simplifies sizing tests in the stores.
55pub const MAX_INDEX_FIELDS: usize = 4;
56
57///
58/// Prelude
59///
60/// Prelude contains only domain vocabulary.
61/// No errors, executors, stores, serializers, or helpers are re-exported here.
62///
63
64pub mod prelude {
65    pub use crate::{
66        traits::Path,
67        value::{InputValue, OutputValue},
68    };
69}