Thank you for your interest in contributing to Corium! Corium is an open-source, high-performance, header-only C++20 framework built for deterministic, zero-heap real-time systems.
Every contribution to Corium must strictly preserve the following architectural guarantees:
-
Zero Dynamic Memory Allocation:
- Never call
new,malloc,std::make_unique, orstd::make_sharedin hot-path library headers. - Use fixed-capacity arrays (
std::array), SBO buffers, and static placement. - All tests must pass
corium_zero_heap_test(zero heap allocations verified via overloaded globalnew/deletehooks).
- Never call
-
Zero RTTI & Zero Exceptions:
- All code must compile cleanly with
-fno-rttiand-fno-exceptions. - Never use
dynamic_cast,typeid,throw,try, orcatch.
- All code must compile cleanly with
-
C++20 Compliance:
- Use standard C++20 features: concepts,
std::variant,std::span, coroutines (co_await,co_yield,co_return),std::jthread,std::stop_token.
- Use standard C++20 features: concepts,
-
Naming Conventions:
PascalCasefor types, classes, structs, and concepts (BasicEventBus,FlightRecorder).camelCasefor methods, functions, and member variables (postDelayed(),processOne())._leadingUnderscorefor private member variables (_eventQueue,_profilerPolicy).ALL_CAPSfor compile-time constants and macro guards (CORIUM_WIRE_MAGIC).
# ASan / UBSan Build
cmake -B build-san -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer" -DCORIUM_BUILD_TESTS=ON -DCORIUM_BUILD_SAMPLES=ON
cmake --build build-san -j$(nproc)
ctest --test-dir build-san --output-on-failure
# ThreadSanitizer (TSan) Build
cmake -B build-tsan -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS="-fsanitize=thread -fno-omit-frame-pointer" -DCORIUM_BUILD_TESTS=ON
cmake --build build-tsan -j$(nproc)
ctest --test-dir build-tsan --output-on-failureWhenever you add or modify public headers in include/corium/:
python3 tools/amalgamate.py
python3 tools/amalgamate.py --checkAll public headers must include:
- Doxygen
@file,@ingroup <group>, and@brieffile-level comment block. @tparam,@param,@return,@note,@warningon public API methods.- Verify documentation coverage:
python3 tools/doc_coverage.py --strictWe adhere to Conventional Commits:
feat(module): add feature descriptionfix(module): fix issue descriptiondocs(module): update documentationrefactor(module): clean up code without altering behaviortest(module): add unit tests