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: entity traits, values, executors, visitors, and
7//! the ergonomics exported via the `prelude`.
8#![warn(unreachable_pub)] // too complex to adhere to right now
9
10extern crate self as icydb;
11
12#[macro_use]
13pub(crate) mod scalar_registry;
14
15// public exports are one module level down
16pub mod db;
17pub mod error;
18pub mod metrics;
19pub mod model;
20pub mod sanitize;
21pub mod traits;
22pub mod types;
23pub mod validate;
24pub mod value;
25pub mod visitor;
26
27// testing
28#[cfg(test)]
29pub(crate) mod testing;
30
31///
32/// CONSTANTS
33///
34
35/// Maximum number of indexed fields allowed on an entity.
36///
37/// This limit keeps hashed index keys within bounded, storable sizes and
38/// simplifies sizing tests in the stores.
39pub const MAX_INDEX_FIELDS: usize = 4;
40
41///
42/// Prelude
43///
44/// Prelude contains only domain vocabulary.
45/// No errors, executors, stores, serializers, or helpers are re-exported here.
46///
47
48pub mod prelude {
49 pub use crate::{
50 model::{entity::EntityModel, index::IndexModel},
51 traits::{EntityKind, Path},
52 value::Value,
53 };
54}