Thank you for your interest in contributing to the Neural Interface Adapter!
- 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
- CMake ≥ 3.16
- GCC ≥ 11, Clang ≥ 14, or MSVC ≥ 2022
- Git for version control
- Doxygen (optional, for API docs)
git clone https://github.com/embeddedos-org/eni.git
cd eni
cmake -B build -DENI_BUILD_TESTS=ON
cmake --build build
ctest --test-dir build --output-on-failureTo build a specific profile:
cmake -B build -DENI_PROFILE=assistive-device
cmake --build buildBefore submitting a PR, ensure all checks pass:
# 1. Full build with tests
cmake -B build -DENI_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-assistive -DENI_PROFILE=assistive-device && cmake --build build-assistive
cmake -B build-industrial -DENI_PROFILE=industrial-gateway && cmake --build build-industrialWhen adding a new input provider (e.g., BCI SDK, sensor adapter):
- Create
providers/src/provider_<name>.cimplementingeni_provider_ops_t - Create the corresponding header in
providers/include/eni_providers/ - Register in the provider manager initialization
- Add unit tests in
tests/ - Document the provider in
docs/
- 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.)
Follow Conventional Commits:
feat: add EEG simulator provider
fix: trim_whitespace off-by-one in config parser
docs: add provider integration guide
ci: add assistive-device 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.