Generic ECS primitives for the helios module ecosystem.
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.
- 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
| 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 |
import helios.ecs;When used as a subdirectory, link against the exported target:
add_subdirectory(path/to/helios-ecs)
target_link_libraries(your_target PRIVATE helios::ecs)Build the project:
cmake -S . -B build
cmake --build buildQuick devtools entrypoint from this repository:
sh ./run-devtools.sh format
sh ./run-devtools.sh format-fix
sh ./run-devtools.sh tidy
sh ./run-devtools.sh tidy-fixrun-devtools.sh is a thin wrapper around CMake targets and expects an already configured build directory (default: cmake-build-debug).
Run formatting checks:
cmake --build cmake-build-debug --target formatRun formatting with in-place fixes:
cmake --build cmake-build-debug --target format-fixRun clang-tidy checks:
cmake --build cmake-build-debug --target tidyRun clang-tidy with autofix:
cmake --build cmake-build-debug --target tidy-fixTarget-specific variants are also available:
cmake --build cmake-build-debug --target format-helios_ecs
cmake --build cmake-build-debug --target tidy-helios_ecsFormatting and clang-tidy checks are sourced from shared helios-devtools config.
Run tests when test discovery is enabled:
ctest --test-dir build --output-on-failure