Code generation
service -> CMake + cmd + internalC++ project
C++ generation emits standalone CMake projects with userver/runtime wiring, typed headers, tests and reusable build images.
When to use
Use this reference when generating, reviewing or operating a Service Architect project.
Behavior
- CMakeLists.txt defines the standalone service and generated code targets.
- cmd/service/main.cpp is the executable entrypoint.
- internal/app contains generated service wiring plus preserved service.cpp/service.hpp extensions.
- internal/functions contains business headers, implementations and unit tests.
- config contains generated C++ configuration types, static_config.yaml and runtime values.
- Referenced user-named Modules become independent CMake projects with generated include/schema trees determined by their graph references.
C++ service directories
Important paths in each generated C++ service.
PathOwnershipDescription
CMakeLists.txtManagedBuild graph for service, contracts, generators, lint and tests.
cmd/service/main.cppPreserved entrypointStarts the generated C++ service.
internal/app/service.generated.*GeneratedRuntime graph and connector wiring.
internal/app/service.cpp + service.hppPreservedCustom service lifecycle extensions.
internal/functions/PreservedBusiness operators, endpoint handlers and tests.
internal/types/ + internal/serdes/MixedGenerated/local contracts and serde registration.
config/config.generated.*GeneratedTyped configuration structures.
static_config.yamlManageduserver component and runtime configuration.
docker-compose.cmake.generated.ymlGeneratedReusable CMake build and runtime workflow.
C++ service tree
<service-name>/
CMakeLists.txt
cmd/service/main.cpp
internal/app/service.generated.cpp
internal/functions/*.{hpp,cpp}
config/ + static_config.yaml
graph/ + docs/ + grafana/ + helm/