Skip to content

Building

To build kura from source, you will need the following:

  • CMake
  • llvm
  • GTest — Optional, required for building and running the tests
  1. First, in the root of the directory, setup cmake:
Terminal window
cmake --preset=clang-debug .
  1. Then build:
Terminal window
cmake --build build --target all

Kura builds with LLVM 20 as well as LLVM 22 (the code that differs between them is guarded on LLVM_VERSION_MAJOR). The clang-llvm20-debug preset looks for LLVM 20 where Debian and Ubuntu (/usr/lib/llvm-20) and Homebrew (llvm@20) install it, and builds in build-llvm20, so it doesn’t disturb a build against another LLVM:

Terminal window
cmake --preset=clang-llvm20-debug .
cmake --build build-llvm20 --target all

If your LLVM 20 is somewhere else, add -DLLVM_DIR=<prefix>/lib/cmake/llvm and -DClang_DIR=<prefix>/lib/cmake/clang. To pin another version, set -DKURA_LLVM_VERSION=<major>.

Kura comes with a “debugger” - a standalone executable that runs a simple rendering loop to allow you to explore your UI before you integrate it.

To build the kura debugger, you will need the following:

  1. First, you need to enable it using CMake:
Terminal window
cmake --preset=<your preset> . -DKURA_BUILD_DEBUGGER=ON
  1. Then build it:
Terminal window
cmake --build . --target debugger