Project Setup with Ark

Ark is typically used as a submodule, and we prefer to build static binaries linked against our third party dependencies. Contact us for more information on a more traditional shared-object build.

Ark Dependencies

Please make sure that you have all of the dependencies listed here before following this guide.


Ark is delivered as a compressed software bundle of source code or a set of libraries and header files.
Ark is configured as a cmake project and can be referenced in your projects’s cmake system.
Ark should be configured as a dependency in your project. An example project directory layout would look something like this:

├── <third party submodules>
│   └── ark  <-- unpack Ark to this location
└── <your source code>
    ├── project1
    └── algorithm

Let’s add ark into your project’s 3rd party library folder.

Enter the subdirectory and unpack the ark software bundle:

$ tar -xf <ARK_V2022.12.0.tar.xz>

The release will have a versioned folder, such as ark-v2022.12.0. It’s recommended to rename that to ark.

At this point, your tree should look something like this:

└── <third party submodules>
    └── ark

The next step is to configure some additional scripts and tools needed for the Ark system.

Make and other scripts

Incorporate the Ark scripts and tools to your project. (For additional references on the top level tools can be found in compiler documentation) Add the scripts as symbolic links to your top level directory:

cd <project dir>
ln -s ./${THIRD_PARTY_SUBMODULES}/ark/.clang-format .clang-format
ln -s ./${THIRD_PARTY_SUBMODULES}/ark/.clang-tidy .clang-tidy
ln -s ./${THIRD_PARTY_SUBMODULES}/ark/.cmake-format.json .cmake-format.json
  • : Script to build the software, a wrapper afor ninja (more details)
  • : Define Ark environment variables, which is referenced by the other scripts
  • : Runs linting

In your top level directory, create a cmake file to reference the directory structure.

Create CMakeLists.txt in the top directory that looks something like this:

# Root build file for the your project.

cmake_minimum_required(VERSION 3.20)
project(MyArkProject LANGUAGES C CXX)

# Include the ark build system configuration.


# Build the submodules.


# Include the source itself.


At this point, you can simply type ./ to build all of the Ark components. You may want to take advantage of ccache support. Build artifacts will be generated in a build subdirectory and unit tests in a subfolder under that.

├── build
|   └──tests
   └── ark

Referencing Ark components

Simply include Ark components in your project as you would normally would. Here’s a very simple example for src/ program

#include "ark/debuglog/log.hh"

int main(int argc, const char **argv)
   LINFO("Using Ark Debuglog");
   return 0;

The associated CMakeLists.txt:


    PRIVATE ark::debuglog)
cd <YourProject>
./ test_program

For a tutorial on how to use the components of Ark, walkthrough the Ark Tutorial which will create stages, serializable messages, pipelines, and interact with data on a user interface.