This file provides agent-oriented guidance for working in the eCAL repository. It summarizes repository layout, component ownership boundaries, and practical coding / validation rules derived from the current build and CI configuration.
Top-level components:
ecal/: Core middleware libraries, core APIs, service internals, benchmarks, and low-level tests.app/: End-user applications and tools (CLI / TUI / GUI), including monitor, recorder, player, sys, and utilities.serialization/: Message-layer adapters and serializers (e.g. protobuf, string, capnproto, flatbuffers).lang/: Language bindings:lang/c/: C API and tests/samples.lang/python/: Python bindings (nanobind-based) + tests/samples.lang/csharp/: C# bindings, tests, and samples.
lib/: Shared helper libraries used by multiple components (parsers, utility libs, Qt helpers, threading utils).contrib/: Optional / extension components (e.g. measurement, ecalhdf5, time plugins).samples/: C++ sample applications.tests/: Additional integration / component tests not colocated with code.doc/: Sphinx documentation sources and tooling.cmake/,cpack/: Build and packaging infrastructure.thirdparty/: Vendored submodules / dependencies.
- Primary build system is CMake.
- The root
CMakeLists.txtdefines many feature toggles (e.g.ECAL_USE_*,ECAL_BUILD_*,ECAL_THIRDPARTY_BUILD_*) and includes most components viaadd_subdirectory(...). - CI builds use Ninja on Linux and Windows for core builds, with additional Visual Studio generation for C# binding builds on Windows.
The Ubuntu workflow (.github/workflows/build-ubuntu.yml) is a good baseline when validating broad changes:
- Install dependencies (Qt, protobuf, HDF5, yaml-cpp, spdlog, tinyxml2, gtest, python venv tooling, etc.).
- Initialize selected submodules.
- Configure CMake with
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=cmake/submodule_dependencies.cmakeand a broad set of features enabled (apps, samples, tests, benchmarks, python binding, docs). - Build:
cmake --build _build --parallel -- -k 0 - Test:
ctest -V --test-dir _build
The Windows workflow (.github/workflows/build-windows.yml) uses:
- MSVC toolchain (v142 / VS2019 compatibility, running on windows-2022).
- Ninja for SDK + complete builds.
- A separate Visual Studio configure/build for
lang/csharptests/samples. - Typical validate sequence: configure -> build -> ctest for core and C#.
When you need a “known good” matrix of build flags, mirror these workflows first.
- Follow existing local style in the touched file; minimize unrelated formatting churn.
- Keep public API changes intentional and synchronized with affected bindings / samples / docs.
- Prefer CMake options and existing helper macros/functions over ad-hoc build logic.
- Preserve cross-platform behavior (Linux + Windows at minimum).
Static analysis guidance:
.clang-tidyis configured and enforced in CI review workflows for C/C++ source changes.- The enabled checks are broad (
clang-analyzer,bugprone,cppcoreguidelines,modernize,performance,readability) with selected suppressions. - clang-tidy excludes thirdparty, build directories, tests, and language-binding directories in the review workflow.
Practical rule: for non-trivial C/C++ changes, run at least targeted build + tests for affected components and keep code clang-tidy friendly.
- Keep C API stable and straightforward; avoid introducing C++-specific semantics into C-facing interfaces.
- Update corresponding samples/tests when API behavior changes.
- Validate through CMake options that include C binding and tests where applicable.
- Python packaging/build is defined in root
pyproject.toml(scikit-build-core + hatch). - Use existing test discovery conventions (
lang/python/tests, files matching*_test.py). - Keep binding behavior aligned with underlying core semantics.
- For Python-related changes, run relevant Python tests and/or binding build target (
ecal_python) where possible.
- C# bindings are built/tested separately in Windows CI after creating an install tree from the core build.
- Keep C# sample/test projects consistent with exported native artifacts and CMake packaging.
- If modifying binding interfaces, ensure corresponding tests/samples still compile and run.
- Documentation is Sphinx-based, with dependencies defined in
doc/pyproject.tomlanddoc/requirements.txt(used in CI). - If behavior, options, or public interfaces change, update docs and examples in the same change.
- Prefer small, scoped changes; avoid opportunistic refactors outside the task.
- Do not modify
thirdparty/unless the task explicitly requires dependency updates. - If changing build flags, packaging, or dependency handling, check both Linux and Windows workflow assumptions.
- Keep generated artifacts out of commits unless explicitly required.
- Preserve license headers and existing copyright notices.
Pick the smallest set that gives confidence for your scope:
- Configure affected build(s) with CMake.
- Build touched targets.
- Run tests for touched components (ctest / pytest / binding tests).
- If docs/user-facing behavior changed, run doc build or at least check docs compile path consistency.
For broad core changes, use the Ubuntu CI recipe as default local reference. For C# changes, include Windows/C# validation expectations from build-windows.yml.
- Core middleware behavior:
ecal/core/,ecal/service/ - Core APIs / protocol definitions:
ecal/core_pb/,serialization/ - End-user tools:
app/ - Shared utility libs:
lib/ - Python:
lang/python/ - C#:
lang/csharp/ - C API:
lang/c/ - Docs:
doc/ - CI/build behavior references:
.github/workflows/
If in doubt, mirror the closest existing implementation pattern in the same subdirectory and validate with the corresponding CI-equivalent build/test path.