Installation¶
This guide covers building Zest from source and running the examples.
Prerequisites¶
- Vulkan SDK - Although Zest has a separate platform layer, only Vulkan is implemented currently. Download from LunarG
- CMake 3.8+ - Build system (if you want to create projects for the examples)
- C++17 compiler (for the examples, C11 for the library only) - MSVC 2019+, GCC 9+, or Clang 10+
- SDL2 - For convenience although you can use anything else if you want (including GLFW). Windowing library (included as submodule)
Linux-Specific Prerequisites¶
On Linux, you'll need to install the following packages:
Vulkan SDK on Linux
While you can install the Vulkan SDK manually from LunarG, many Linux distributions provide sufficient Vulkan development packages. If you need Slang support, you should install the full Vulkan SDK and source the setup script:
Clone the Repository¶
Submodules
The --recursive flag is important - Zest uses submodules for SDL2, ImGui, and other dependencies used by the examples.
Build with CMake¶
Run the Examples¶
After building, you'll find the executables in the build directory:
Working Directory
Run examples from the repository root directory so they can find the examples/assets/ folder.
Optional: Enable Slang Shader Compiler¶
If you want to use the Slang shader compiler for runtime shader compilation:
This enables the zest-compute-example which demonstrates Slang integration with compute shaders.
Slang Requirement
The VULKAN_SDK environment variable must be set when using Slang. On Linux, source the Vulkan SDK setup script before running CMake:
Run the Test Suite¶
The test suite includes 68 tests covering frame graph compilation, memory management, pipeline states, and image formats.
Using Zest in Your Project¶
Option 1: Copy Headers¶
Copy these files to your project:
zest.h- Main API headerzest_vulkan.h- Vulkan implementationzest_utilities.h(optional) - image loading, mesh primitives, basic gltf loading, fonts
Option 2: Add as Subdirectory¶
Implementation Defines¶
In exactly one .cpp file, define the implementation macros before including:
All other files just include the header normally:
Troubleshooting¶
Vulkan Validation Errors¶
Enable validation layers during development:
zest_window_data_t window_data = zest_implsdl2_CreateWindow(50, 50, 1280, 768, 0, "My App");
zest_device device = zest_implsdl2_CreateVulkanDevice(&window_data, true); // true = enable validation
Missing Submodules¶
If you cloned without --recursive:
GPU Not Supported¶
Zest requires Vulkan 1.2+ with bindless descriptor support. Most discrete GPUs from 2016+ are supported. Some integrated GPUs may not have full bindless support.
Linux: shaderc Not Found¶
If you get a warning about shaderc not being found, install the shaderc development package for your distribution (see Linux-Specific Prerequisites above). shaderc is required for runtime shader compilation.
Linux: SDL2 Not Found¶
If CMake reports SDL2 not found:
- Install the SDL2 development package (see Linux-Specific Prerequisites above)
- If using the Vulkan SDK's SDL2, ensure
VULKAN_SDKis set before running CMake
Linux: Slang Library Not Found¶
If Slang is enabled but not found:
- Ensure the Vulkan SDK is installed (not just system packages)
- Source the SDK setup script:
source ~/vulkansdk/x.x.x.x/setup-env.sh - Verify
VULKAN_SDKis set:echo $VULKAN_SDK - Re-run CMake after sourcing the setup script