helios::ecs
Generic ECS primitives for the helios module ecosystem.
Overview
helios::ecs provides reusable C++23 building blocks for entity identity,
component storage, lifecycle reflection, and typed queries. It is used by
higher-level helios modules that need strongly typed entity domains and compact
component storage and can be used as a standalone ECS-implementation with other projects that require high performance for real-time applications.
Features
- Versioned, strongly typed entity handles via
EntityHandle<TStrongId> - Configurable entity registries with strong-id collision tracking
- Sparse-set component storage with dense iteration
- Typed entity/component views with filtering helpers
- Trait-based component lifecycle reflection
- Multi-domain world composition with
TypedHandleWorld
Module surface
| Area | Public API |
|---|---|
| Entity management | EntityHandle, EntityRegistry, EntityManager, Entity, EntityResolver, TypedHandleWorld |
| Component metadata | ComponentTypeId, ComponentOps, ComponentOpsRegistry, ComponentReflector |
| Storage/query | SparseSet, View |
| Lookup strategies | HashedLookupStrategy, LinearLookupStrategy |
| Concepts/traits | ECS constraints and lifecycle hook detection traits |
Usage
C++ module
import helios.ecs;
CMake
When used as a subdirectory, link against the exported target:
add_subdirectory(path/to/helios-ecs)
target_link_libraries(your_target PRIVATE helios::ecs)
Development
Build the project:
cmake -S . -B build
cmake --build build
Run tests when test discovery is enabled:
ctest --test-dir build --output-on-failure