Skip to content
ark

Build options

Option Default Purpose
ARK_BUILD_APPLICATIONS ON Build the launcher, seven server libraries and enabled application examples/tests
ARK_BUILD_RUNTIME_PLUGINS Value of ARK_BUILD_APPLICATIONS Build official runtime libraries selected by ARK_BUILD_PLUGIN_<NAME>
ARK_BUILD_CONFIG ON for applications, runtime plugins or core tests, otherwise OFF Build the shared application/plugin configuration reader; network regressions also build it for HTTP
ARK_BUILD_PROTO ON for applications or runtime plugins, otherwise OFF Generate and build protocol messages; both build modes require it
ARK_BUILD_NETWORK_TESTS OFF Build focused C++ network/logging regressions
ARK_BUILD_TESTS ON Build legacy test programs
ARK_BUILD_CORE_TESTS Value of ARK_BUILD_TESTS Build C++20 core and optional Protobuf regressions
ARK_BUILD_CONFIG_TOOL OFF Build the native offline Entity JSON/CSV/XLSX exporter; requires the vcpkg config-tool feature or equivalent OpenXLSX/nlohmann packages
ARK_BUILD_CONFIG_TOOL_TESTS Value of ARK_BUILD_TESTS Build native exporter and generated C++ header regressions when the exporter is enabled
ARK_BUILD_EXAMPLES ON Build enabled examples
ARK_BUILD_HTTP_EXAMPLE_TESTS ON for core tests with Boost and HTTP/Net/Etcd Client API targets, otherwise OFF Compile and run actual HTTP example DSOs with isolated service doubles; explicit OFF is respected
ARK_BUILD_PLUGIN_CONSUL OFF Archived Consul runtime plugin; explicit opt-in retained
ARK_BUILD_PLUGIN_ETCD_CLIENT OFF Archived Etcd Client runtime plugin; requires the etcd-client vcpkg feature
ARK_BUILD_PLUGIN_KAFKA OFF Archived Kafka runtime plugin; requires the existing driver dependencies
ARK_BUILD_PLUGIN_OSSSDK OFF Archived OSS SDK scaffold; explicit opt-in retained
ARK_BUILD_PLUGIN_MYSQL OFF Build the native MySQL coroutine plugin; requires ARKNET_ENABLE_SSL=ON
ARK_BUILD_PLUGIN_REDIS OFF Build the native Redis coroutine plugin; enable SSL for TLS pools
ARK_BUILD_DATABASE_TESTS OFF Build native database and public plugin regressions; requires an explicit ARKNET_SOURCE_DIR
ARK_BUILD_BENCHMARKS OFF Build standalone C++ benchmark programs
ARK_OPEN_FILE_LOG ON Default file output for the legacy logger library API; application manifests independently select output with logging.file
ARK_USE_GUID_32 OFF Select the 32-bit GUID configuration; consumers inherit the setting through public interface targets
ARKNET_SOURCE_DIR Empty Use an independent local arknet checkout
ARKNET_REVISION Repository-pinned commit Select the fetched arknet revision; an existing CMake cache retains its value
ASIO_STANDALONE OFF OFF selects Boost; ON selects Standalone Asio

The project requires C++20 through CMake and disables compiler extensions. Applications, official runtime plugins and network tests require Boost.Asio and Boost.Beast. Standalone Asio is available for core-only and native database development builds; explicitly disable all three build modes when selecting it. CMake rejects unsupported combinations before fetching dependencies. A local arknet checkout is a development override, not a copy inside ark.

When upgrading arknet, use a new build directory or explicitly change the cached revision. A nonempty ARKNET_SOURCE_DIR takes precedence over fetching the pin; see Upgrade arknet.

Official plugin options use ARK_BUILD_PLUGIN_<NAME>. The default runtime selection is kernel, net, bus and utility; enable the optional MySQL/Redis targets to build native coroutine plugins. Protocol and plugin-load tests do not replace real-server deployment acceptance. See project layout, protocol generation and network builds.

The two build switches select independent target groups; defaults are evaluated in a fresh CMake cache.

Applications Runtime plugins Target groups
OFF OFF Public APIs and separately enabled tools/tests
OFF ON Selected official plugin DSOs and AFProto; no launcher/server libraries
ON OFF Launcher, seven server libraries and enabled application examples/tests
ON ON Original application and selected plugin build

Application-only builds need compatible plugin libraries at deployment. The optional guest-room server acceptance requires Kernel, Utility, Bus and Net runtime targets; CMake reports a missing provider when that acceptance target is enabled. Bus and HTTP runtime libraries require the configuration reader; other selected plugins may use ARK_BUILD_CONFIG=OFF. Kernel JSON follows the Kernel runtime selection, configuration tool or Protobuf core tests. Existing cache values remain unchanged when switching modes.

With ARK_BUILD_EXAMPLES enabled, the coroutine task example also builds with applications disabled. Enabled application plugin examples still require application builds. HTTP example construction tests can run separately with core tests; see HTTP examples.

See MySQL and Redis for plugin configuration and coroutine APIs.

The optional configuration exporter has an exporter-only build path with applications, runtime plugins, Protobuf, core tests and the runtime configuration reader disabled. It does not configure framework networking or runtime plugins. XLSX uses OpenXLSX 0.5.1; JSON validation reuses ark::kernel_json. check-config-tool runs its native regressions and CLI checks. Selecting the vcpkg feature supplies packages but does not enable the CMake target.

Consul, Etcd Client, Kafka and OSS SDK are archived, with feature development paused. Default examples need none of their services; sources, public headers, CMake targets and existing compatibility checks remain available. Existing caches may retain Etcd Client’s earlier ON value; use a new build directory or explicitly set -DARK_BUILD_PLUGIN_ETCD_CLIENT=OFF.

Native database plugins

With the dependencies from the installation guide available, build and install only the two database runtime plugins, without the launcher or server libraries:

cmake -S . -B database-runtime-build \
  -DARK_BUILD_APPLICATIONS=OFF -DARK_BUILD_RUNTIME_PLUGINS=ON \
  -DARK_BUILD_EXAMPLES=OFF -DARK_BUILD_TESTS=OFF -DARK_BUILD_CORE_TESTS=OFF \
  -DARK_BUILD_PLUGIN_KERNEL=OFF -DARK_BUILD_PLUGIN_NET=OFF \
  -DARK_BUILD_PLUGIN_BUS=OFF -DARK_BUILD_PLUGIN_UTILITY=OFF \
  -DARK_BUILD_PLUGIN_MYSQL=ON -DARK_BUILD_PLUGIN_REDIS=ON -DARKNET_ENABLE_SSL=ON
cmake --build database-runtime-build --parallel 2
cmake --install database-runtime-build --prefix /path/to/ark-prefix

Explicit inventories generate public-header mappings at configure time. ark::<name> carries the include root even with runtime plugins disabled. Each header has one co-located source; mappings are build artifacts, not another source tree.

Plugin group Mapping boundary
MySQL, Redis, Utility, Net, Bus, HTTP Excludes private assembly/factories
Kernel Retains all 38 headers, including kernel_plugin.hpp
Consul, Etcd Client, Kafka, OSS SDK, Physic Retains all 22 public headers, including implementation/assembly

Registration keys, public visibility and explicit opt-in builds are retained. Kernel, Consul, Etcd Client, OSS SDK and Kafka construction changes public layouts: rebuild consumers; private factories remain unmapped/uninstalled. Header mapping does not validate optional drivers.

Applications CI explicitly enables Consul and Etcd Client on Linux, macOS and Windows. Its check-core run includes their construction, DLL lifecycle and production export checks; these checks require no Consul or Etcd service and do not establish service interoperability. Archived Etcd Client defaults to OFF, retaining ARK_BUILD_PLUGIN_ETCD_CLIENT=ON as an explicit opt-in. Building it requires the existing nlohmann_json package (etcd-client vcpkg feature); disabling it does not add that JSON dependency to core tests.

OSS SDK remains optional and off by default (ARK_BUILD_PLUGIN_OSSSDK=OFF). Core tests include its real factory/assembly and controlled DSO checks without Protobuf or a runtime plugin. With the runtime plugin selected, check-oss-sdk-plugin also loads the actual DSO and checks its exports; check-core includes the applicable checks. The implementation is still a TODO scaffold, with no object-storage client or service acceptance. See OSS SDK construction migration.

Link a consumer to ark::mysql and/or ark::redis for the public headers and usage requirements. These public interface targets do not load a runtime library. Deploy the selected libraries with the launcher and add their stems to the application’s manifest:

[application]
plugin_library_dir = "bin/"
plugin_config_dir = "conf/"

[[plugins]]
name = "ark_mysql_plugin"
config = ""

[[plugins]]
name = "ark_redis_plugin"
config = ""

Include only the providers the application needs. The empty config is intentional: consumers configure named connections through the public modules, rather than legacy database XML files. Follow runtime library selection for platform extensions, Debug suffixes and compatible public interface settings. Resolve the module during consumer initialization and start its operations through a managed task group.

Core headers live under src/core/; ark::core supplies public header usage requirements, retaining <ark/...>. The launcher source is src/application/, with unchanged app and app_d output names.

Installation and archives

ARK_INSTALL defaults to ON for the top-level project and OFF for embedded builds. It enables explicit public-header installation, relocatable CMake exports, check-install and TGZ/ZIP CPack archives. ARK_USE_INSTALLED_ARKNET=ON resolves a separately installed arknet package and takes precedence over the source/revision overrides. It defaults to OFF, preserving source dependency builds. See installation and package consumption. Packaging does not enable optional runtime plugins or validate their external drivers.

Net’s 18 public headers exclude http_client_module_impl.hpp; use <ark/net/http_client_module.hpp> and public interface lookup. This removal changes source/ABI compatibility; see Net migration. Private factory declarations are not installed.

Kafka remains off by default (ARK_BUILD_PLUGIN_KAFKA=OFF). With the existing driver dependencies, runtime plugins, Protobuf and core tests enabled, ARK_BUILD_PLUGIN_KAFKA=ON adds check-kafka-construction and check-kafka-plugin to check-core. The first exercises actual factory/assembly plus controlled DSO lifecycle and enabled updates; the second also checks production DSO exports. No broker is contacted. Disabling Kafka avoids Kafka dependency discovery in core tests. See Kafka construction migration for rebuild requirements and verification boundaries.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close