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

Introduction

vk-graph is a high-performance Vulkan driver for the Rust programming language featuring automated resource management and execution. It is blazingly-fast, built for real-world use, and supports modern Vulkan commands1.

This guide book will walk you through the mental model of this crate and help explain how it maps to Vulkan API usage.

Important

Users should be familiar with the Vulkan specification .

Design

This guide provides a tour of the main public types:

Driver
Buffer, Image, Shader, etc..
Graph
Builder-pattern for Vulkan commands
Queue
Automated graph execution

A Graph is data built dynamically by your program every frame. Once complete, the graph is optimized into a Queue which may be used to submit commands to the Vulkan implementation.

The overhead of building and submitting each graph is typically a few hundred microseconds.

Philosophy

Vulkan is hard. Synchronization is extremely hard. vk-graph makes Vulkan less painful to write and a joy to maintain.

The driver is based off the popular ash crate and vk-sync; reasoned as follows:

  • Everything is constructed from “Info” structs; all info is Copy
  • Match the naming described in the specification
  • Support all modern Vulkan usage1 except video2
  • Don’t use macro-magic or anything that needs to be learned
  • Don’t rely on “helper” functions unless absolutely required

History

  • 2018 — Project started privately as a game engine using Corange
  • 2020 — Project migrated to Github and named screen-13
  • 2022 — v0.2 released with RenderGraph type based on Kajiya
  • 2026 — Project renamed vk-graph (v0.14)

  1. Modern Vulkan usage means no pixel queries. Anything else unsupported is due to there being better options, no current need, or no interest. Please open an issue. ↩2

  2. Video encode/decode is interesting but unsupported. As an alternative consider ffmpeg, libavcodec, or one of the experimental Rust bindings to the Vulkan video API.