mirror of
https://github.com/logos-co/logos-dev-boost.git
synced 2026-08-31 01:51:09 +00:00
Universal Module Template
This template is used by logos-dev-boost init <name> --type module to scaffold a new universal C++ module.
The scaffold tool in mcp-server/tools/scaffold.ts generates files programmatically using this template's patterns. The actual file generation logic is in the createUniversalModule() function.
Generated files
src/<name>_impl.h-- Pure C++ implementation header (module API)src/<name>_impl.cpp-- Implementation filemetadata.json-- Module identity with"interface": "universal"CMakeLists.txt-- Useslogos_module()macro with generated_code sourcesflake.nix--mkLogosModulewithpreConfigurerunninglogos-cpp-generatortests/main.cpp-- Test runner entry point (LOGOS_TEST_MAIN())tests/test_<name>.cpp-- Unit tests usingLOGOS_TEST()macros and assertionstests/CMakeLists.txt--logos_test()macro integration (auto-detected bylogos-module-builder)
Testing
The generated tests use logos-test-framework. Run with:
nix build .#unit-tests -L
logos-module-builder auto-detects tests/CMakeLists.txt and creates checks.<system>.unit-tests and packages.<system>.unit-tests.
Reference
See repos/logos-accounts-module for a complete working example.