Thank you for your interest in contributing to the AI Layer!
- Fork the repository
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes
- Run the build and tests locally
- Submit a pull request
git clone https://github.com/embeddedos-org/eai.git
cd eai
cmake -B build -DEAI_BUILD_TESTS=ON
cmake --build build
ctest --test-dir build --output-on-failureTo build a specific profile:
cmake -B build -DEAI_PROFILE=smart-camera
cmake --build buildAll pull requests must pass the following CI checks before merging:
| Check | Platform | What It Validates |
|---|---|---|
| Build (ubuntu-latest) | Linux | GCC build with all libraries and tests |
| Build (windows-latest) | Windows | MSVC build — verifies cross-platform portability |
| Build (macos-latest) | macOS | Clang build — verifies Apple platform support |
| Profile (smart-camera) | Linux | Smart camera profile compiles cleanly |
| Profile (industrial-gateway) | Linux | Industrial gateway profile compiles cleanly |
| Profile (robot-controller) | Linux | Robot controller profile compiles cleanly |
| Profile (mobile-edge) | Linux | Mobile edge profile compiles cleanly |
Before submitting a PR, ensure all checks pass:
# 1. Full build with tests
cmake -B build -DEAI_BUILD_TESTS=ON
cmake --build build --config Release
ctest --test-dir build --output-on-failure -C Release
# 2. Profile builds (test at least one)
cmake -B build-camera -DEAI_PROFILE=smart-camera && cmake --build build-camera
cmake -B build-gateway -DEAI_PROFILE=industrial-gateway && cmake --build build-gatewayThe nightly workflow runs additional checks not required for PRs but monitored for regressions:
- Full test suite with
EAI_BUILD_TESTS=ONon all 3 OS platforms - All 4 profile builds
- Cross-compilation for AArch64, ARM hard-float, and RISC-V 64
- Standard: C11 (
-std=c11) - Warnings:
-Wall -Wextramust compile clean (zero warnings) - Platform guards: All platform-specific code must be guarded:
#ifdef _WIN32for Windows-specific code#ifdef __APPLE__for macOS-specific code#ifdef _MSC_VERfor MSVC compiler intrinsics#if defined(__GNUC__) || defined(__clang__)for GCC/Clang builtins
- Portability rules:
- No
__builtin_*without MSVC fallback - No hardcoded Unix paths (
/tmp/) — usegetenv("TEMP")on Windows - Always
#include <stddef.h>when usingsize_t - Always
#include <stdlib.h>when usinggetenv(),malloc(), etc.
- No
- Include guards: Use
#ifndef HEADER_NAME_H/#define/#endif - Types: Use
<stdint.h>types (uint32_t,int8_t, etc.)
When adding a new industrial connector (e.g., MQTT, OPC-UA, Modbus, CAN):
- Create
framework/src/connector_<name>.cimplementingeai_fw_connector_ops_t - Create the corresponding header in
framework/include/eai_fw/ - Register in the connector manager initialization
- Add unit tests in
tests/
Follow Conventional Commits:
feat: add OPC-UA connector for industrial gateways
fix: memory_lite LRU eviction on full store
docs: add runtime integration guide
ci: add smart-camera profile to CI matrix
chore: bump version to 0.2.0
- Code compiles with zero warnings on GCC, Clang, and MSVC
- All existing tests pass
- New features include unit tests in
tests/ - Platform-specific code has
#ifdefguards for all 3 OS targets - No hardcoded filesystem paths
- Commit messages follow conventional commits format
- Use GitHub Issues with the appropriate label (
bug,enhancement,question) - Include: OS, compiler version, profile, and full error output
- For build failures: attach the full CMake configure + build log
By contributing, you agree that your contributions will be licensed under the MIT License.