A modern, highly optimized C++23 shared library designed for pipes and filters. This project aligns with established regulatory software development lifecycle processes.
It serves as the C++ pendant to JLegMed (Java Legacy Mediator), specifically tailored for resource-constrained IoT, embedded systems, and real-time environments.
To ensure deterministic behavior and meet qualification standards, the project utilizes a highly controlled toolchain:
- Language Standard: C++23 (Enforced via CMake)
- Build System: CMake 4.1+ (Target-based architecture)
- Compiler: Apple Clang 21.0.0 / GCC 13+
- Unit Testing Framework: GoogleTest v1.17.0 (Integrated as SOUP via
FetchContent)
#include "clegmed/plugins/shortcuts.hpp"
int main(int argc, char** argv) {
using namespace clegmed::shortcuts;
auto clegmed = CLegMed(argc, argv,
FlowGraph{}
.every(2s)
.from(emit("Hello "))
.then(append("World"))
.consumeWith(logInfo())
);
clegmed.run();
}- clegmed-template — C++ copier-template for quick start
The project follows a mirrored directory layout for optimal separation of public interfaces, inner logic, and validation suites:
clegmed/
├── CMakeLists.txt # Central target-based build configuration
├── REQUIREMENTS.md # Software Requirements Specification (SRS)
├── include/ # Public API Headers
│ └── clegmed/
│ └── utils/ # Utility functions for core- and plugins
│ └── core/ # Core subsystem definitions
│ └── plugins/ # Plugins definitions
( ├── src/ ) # Internal Implementation (Source) for future plugins that require external dependencies or cpp files
( │ └── plugins/ ) # Plugins implementation
└── tests/ # Verification Suite (Mirrored)
└── core/ # GoogleTest cases for the core subsystem
Ensure you have CMake (4.1+) and a C++23 compliant compiler installed on your system.
We enforce an out-of-source build pattern to keep the repository root pristine:
# 1. Create and enter the build directory
mkdir -p build && cd build
# 2. Configure the project and fetch dependencies (GoogleTest)
cmake ..
# 3. Compile the shared library and the test runner
cmake --build .Tests are automatically registered with CMake's test automation runner (CTest):
# Run all tests using CTest
ctest --output-on-failureTo comply with regulatory requirements, all commit messages must follow the Conventional Commits standard and include a tracking ID matching the REQUIREMENTS.md.
Format: <type>(<scope>): <description> [<TRACKING-ID>]
- Feature Commit Example:
feat(core): implement localized engine initialization [REQ-002] - Maintenance Commit Example:
chore(cmake): bump build version to 0.1.0 [CHORE-000]
If your message does not contain a valid [REQ-XXXX], [BUG-XXXX], or [CHORE-XXXX] token, the local Git-Hook will reject the commit.
As a header only library, there is no need to create a release. Instead, we use tagging on GitHub at the moment, so that fetch-content can be used to fetch the latest release.
- Create release
Adjust the version in
CMakeLists.txtvalidateREQUIREMENTS.mdand create a tag with the new version number.git tag -a v1.0.0 -m "Release version 1.0.0 [CHORE-001]" git push origin v1.0.0 ```