khora_data/ecs/mod.rs
1// Copyright 2025 eraflo
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! Implements Khora's custom **Chunked Relational Page ECS (CRPECS)**.
16//!
17//! This module contains the complete implementation of the engine's Entity-Component-System,
18//! which is the heart of the **[D]ata** layer in the CLAD architecture.
19//!
20//! The CRPECS is designed from the ground up to enable the **Adaptive Game Data Flows (AGDF)**
21//! concept from the SAA philosophy. Its key architectural feature is the dissociation
22//! of an entity's identity from the physical storage of its component data, which allows
23//! for extremely fast structural changes (adding/removing components).
24//!
25//! The primary entry point for interacting with the ECS is the [`World`] struct.
26
27mod bitset;
28mod bundle;
29pub mod component;
30mod components;
31mod entity;
32mod entity_store;
33pub mod layout;
34pub mod maintenance;
35mod page;
36mod planner;
37mod query;
38mod query_plan;
39mod registry;
40mod serialization;
41pub mod soa;
42mod storage;
43pub mod system;
44pub mod systems;
45mod world;
46mod world_ext;
47
48pub use bitset::DomainBitset;
49pub use bundle::ComponentBundle;
50pub use component::Component;
51pub use components::*;
52pub use entity::*;
53pub use maintenance::EcsMaintenance;
54pub use page::*;
55pub use query::*;
56pub use query_plan::{QueryMode, QueryPlan};
57pub use registry::*;
58pub use soa::{FieldSoaColumn, SoaLayout};
59pub use system::{DataSystemRegistration, TickPhase};
60pub use world::*;
61pub use world_ext::{entities_with_all_tags, entities_with_any_tag, entities_with_tag};
62
63#[cfg(test)]
64mod tests;