
Vulkan in Rust.
Native and explicit.
Vk is a Vulkan library for graphics, compute, and other demanding GPU workloads. It combines bindings generated from the Vulkan registry, cached dispatch, and a Rust allocator in one crate under the MIT license.
1// SAFETY: the caller establishes native valid usage.2unsafe {3 let instance = vk::create_instance(&entry, &info, None)?;4 let device = vk::create_device(&instance, physical, &device_info, None)?;56 vk::cmd_bind_pipeline(&device, commands, vk::PipelineBindPoint::COMPUTE, pipeline)?;7 vk::cmd_dispatch(&device, commands, 16, 16, 1)?;89 vk::destroy_device(device, None);10 vk::destroy_instance(instance, None);11}
Two calling styles. One implementation.
Use free functions in the style of the C API or methods on the Instance and Device wrappers. Both dispatch directly through the same cached function pointers.
Fluent new().set_*() construction keeps backing storage live across every generated record, while native fields and the unsafe contract stay within reach.
The bindings the Oa Library is built on.
VK exposes native Vulkan handles and explicit lifetimes directly, with the complete unsafe contract. OA adds semantic values and manages execution through its runtime. Choose the layer that matches the application.
Registry generated
Two calling styles
Borrowed construction
Explicit ownership
Integrated allocator
Zero toolchain
Qualification

A Rust allocator based on VMA.
Based on AMD's Vulkan Memory Allocator, vk::mem is written entirely in Rust. TLSF and linear strategies, custom pools, virtual placement, persistent mapping, budgets, and relocation with a bounded number of passes are available when you enable the allocator feature.
Managed buffers and images move through vk::mem operations; the native vk::create_buffer binding stays one layer below for callers who bind their own memory.
v0.13.5 inlines allocator publication and removes repeated export checks and reservations.
vkrust
Package
vk::
Namespace
MIT
License
0.13.5
Version
Allocator timings against VMA.
We compare paired medians for allocation and release together, with each sample run in a fresh process. The table shows the time for vk::mem relative to VMA 3.4.0. For 20 workloads, the full 95% interval was below 1.0×.[*]
| Workload | vk / VMA | 95% interval |
|---|---|---|
| Virtual TLSF · churn at minimum offset | 0.624× | 0.619 to 0.630 |
| Virtual linear · LIFO free | 0.697× | 0.607 to 0.711 |
| Virtual linear · churn | 0.760× | 0.739 to 0.806 |
| Virtual TLSF · churn · 32 live | 0.810× | 0.755 to 0.875 |
| Pooled buffers · TLSF · reverse · 1 live | 0.911× | 0.902 to 0.928 |
| Pooled buffers · TLSF · LIFO free | 0.924× | 0.903 to 0.936 |
| Separate buffers · LIFO free | 0.966× | 0.948 to 1.026 |
| Pooled buffer · map, write 8 bytes, unmap | 1.011× | 1.002 to 1.036 |
| Separate images · LIFO free | 1.037× | 1.018 to 1.060 |
| Pooled buffers · TLSF · shuffled free | 1.042× | 1.013 to 1.063 |
| Pooled images · TLSF · LIFO free | 1.045× | 1.018 to 1.058 |
| Pooled buffers · TLSF · churn · 32 live | 1.057× | 1.042 to 1.087 |
| Pooled buffers · linear · shuffled free | 1.091× | 0.980 to 1.172 |
- [*]
Surface Laptop 5 with a Core i7-1265U, Intel Iris Xe (Alder Lake GT2), Mesa 26.3.1, loader 1.4.363, device API 1.4.363. The Rust release build used optimization level 3, thin LTO, and one codegen unit. VMA 3.4.0 used C++17 with -O3. Each workload used 20 interleaved pairs in fresh processes on . The measured development commit was
05bb378. Treat the intervals as descriptive for this device and driver. Full methodology and all 44 workloads.