SAService Architect Back to designer
SAService ArchitectDocumentation
Code generation service -> CMake + cmd + internal

C++ 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.txtManaged

Build graph for service, contracts, generators, lint and tests.

cmd/service/main.cppPreserved entrypoint

Starts the generated C++ service.

internal/app/service.generated.*Generated

Runtime graph and connector wiring.

internal/app/service.cpp + service.hppPreserved

Custom service lifecycle extensions.

internal/functions/Preserved

Business operators, endpoint handlers and tests.

internal/types/ + internal/serdes/Mixed

Generated/local contracts and serde registration.

config/config.generated.*Generated

Typed configuration structures.

static_config.yamlManaged

userver component and runtime configuration.

docker-compose.cmake.generated.ymlGenerated

Reusable 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/