Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Dev Environment

Vulkan SDK

Download and install Vulkan SDK 1.4+. Make sure the VULKAN_SDK environment variable is set — CMake uses find_package(Vulkan) to locate it.

Toolchain (MSYS2 UCRT64)

Install MSYS2, then in the UCRT64 terminal:

pacman -S mingw-w64-ucrt-x86_64-clang \
          mingw-w64-ucrt-x86_64-cmake \
          mingw-w64-ucrt-x86_64-ninja \
          mingw-w64-ucrt-x86_64-clang-tools-extra

Clone & Build

git clone --recurse-submodules <repo-url>
cd vulkan

# if already cloned without submodules:
git submodule update --init --recursive
cmake -B build -G Ninja \
  -DCMAKE_C_COMPILER=clang \
  -DCMAKE_CXX_COMPILER=clang++

This generates compile_commands.json for clangd.

cmake --build build -j$(nproc)
./build/vulkan

Or use the shortcut:

./run.sh          # build + run
./run.sh debug    # build + gdb

Editor

Any editor with clangd support works (VS Code, Neovim, etc.). The build generates build/compile_commands.json automatically.

Formatting and linting are enforced by .clang-format and .clang-tidy.