MCPcopy Index your code
hub / github.com/KyleMayes/vulkanalia

github.com/KyleMayes/vulkanalia @v0.35.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.35.0 ↗ · + Follow
4,953 symbols 10,956 edges 119 files 503 documented · 10%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

vulkanalia

Crate Documentation CI MSRV

Vulkan bindings for Rust.

Released under the Apache License 2.0.

Heavily inspired by the ash crate.

Vulkan Tutorial

For users new to Vulkan, there is a complete adaptation of https://vulkan-tutorial.com by Alexander Overvoorde to use Rust and vulkanalia instead of C++. The published version of this tutorial can be found here and the sources for the tutorial (including standalone working code examples for each chapter) are in this repository in the tutorial directory.

Overview

vulkanalia-sys consists of the Vulkan types and command signatures generated from the Vulkan API Registry. If you want to use the raw Vulkan API and are willing to handle function loading yourself you can use this crate.

vulkanalia offers a fairly thin wrapper around vulkanalia-sys that handles function loading for you and makes the Vulkan API somewhat less error prone and more idiomatic to use from Rust. For a detailed overview of how vulkanalia wraps the Vulkan API, see the API Concepts section of the Overview chapter of the Vulkan tutorial which can be found here.

But wait, there's more!

Cargo Features

The vulkanalia crate has the following notable non-default Cargo features:

  • libloading (non-default) – enables integration with libloading (adds the LibloadingLoader struct which can be used to load the initial Vulkan commands from a Vulkan shared library)
  • window (non-default) – enables integration with raw-window-handle (adds the window module which can be used to create surfaces for windows from libraries that support raw-window-handle (e.g., winit)
  • provisional (non-default) – enables access to provisional Vulkan extensions (WARNING: these extensions are not guaranteed to be backwards compatible and are not intended to be used in production applications)

By default, the vulkanalia-sys and vulkanalia crates depend on the Rust standard library. However, by disabling the default features for these crates, you can use either of these crates in a no_std environment. If you do this, the following features are of note:

  • no_std_error (non-default): enables implementations of the Error trait for various error types in vulkanalia and vulkanalia-sys when the default std feature is not enabled (the usage of the Error trait in core is not yet stable and requires the core-error feature to be enabled)

Example

See the examples directory for an implementation of the classic triangle example using vulkanalia.

Extension points exported contracts — how you extend this code

Handle (Interface)
A Vulkan handle type. [58 implementers]
vulkanalia-sys/src/handles.rs
InputChainStruct (Interface)
A Vulkan struct that could be part of an input pointer chain. [1185 implementers]
vulkanalia/src/vk/chains.rs
Example (Interface)
An example Vulkan app implementation. [2 implementers]
examples/src/lib.rs
Entity (Interface)
A Vulkan API registry entity (e.g., struct, union, command). */
generator/src/main/kotlin/com/kylemayes/generator/registry/Extract.kt
Alloc (Interface)
(no doc) [2 implementers]
ext/vma/src/allocation.rs
DispatchableHandle (Interface)
A [`Handle`] with a representation of `usize` (a pointer to an opaque type). <https://docs.vulkan.org/spec/latest/chapt [1 …
vulkanalia-sys/src/handles.rs
OutputChainStruct (Interface)
A Vulkan struct that could be part of an output pointer chain. [552 implementers]
vulkanalia/src/vk/chains.rs
Type (Interface)
A C/C++ type. */
generator/src/main/kotlin/com/kylemayes/generator/registry/Extract.kt

Core symbols most depended-on inside this repo

commands
called by 932
vulkanalia/src/vk/versions.rs
set
called by 647
vulkanalia-sys/src/video.rs
handle
called by 434
vulkanalia/src/vk/versions.rs
get
called by 335
vulkanalia-sys/src/video.rs
format
called by 117
generator/src/main/kotlin/com/kylemayes/generator/generate/Generate.kt
make_version
called by 100
vulkanalia-sys/src/macros.rs
free_memory
called by 99
ext/vma/src/allocator.rs
destroy_buffer
called by 79
ext/vma/src/allocator.rs

Shape

Class 2,019
Method 1,734
Function 963
Interface 226
Enum 11

Languages

Rust95%
Kotlin5%
Python1%

Modules by API surface

vulkanalia-sys/src/structs.rs1,362 symbols
vulkanalia/src/vk/extensions.rs826 symbols
vulkanalia-sys/src/video.rs590 symbols
vulkanalia/src/vk/versions.rs250 symbols
vulkanalia-sys/src/enums.rs156 symbols
generator/src/main/kotlin/com/kylemayes/generator/registry/Extract.kt75 symbols
vulkanalia-sys/src/handles.rs68 symbols
tutorial/src/32_secondary_command_buffers.rs66 symbols
tutorial/src/31_recycling_command_buffers.rs65 symbols
tutorial/src/30_push_constants.rs63 symbols
tutorial/src/29_multisampling.rs63 symbols
tutorial/src/28_mipmapping.rs61 symbols

For agents

$ claude mcp add vulkanalia \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page