ash 0.33.1+1.2.186

Vulkan bindings for Rust
Documentation

Vulkan API

https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/index.html

Examples

use ash::{vk, Entry};
# fn main() -> Result<(), Box<dyn std::error::Error>> {
let entry = unsafe { Entry::new() }?;
let app_info = vk::ApplicationInfo {
api_version: vk::make_api_version(0, 1, 0, 0),
..Default::default()
};
let create_info = vk::InstanceCreateInfo {
p_application_info: &app_info,
..Default::default()
};
let instance = unsafe { entry.create_instance(&create_info, None)? };
# Ok(()) }

Getting started

Load the Vulkan library at the default location using [Entry::new()][EntryCustom<_>::new()], or at a custom location using [Entry::with_library("path/to/vulkan")][EntryCustom<_>::with_library()]. These loaders use [libloading]. If you wish to perform function loading yourself call [EntryCustom::new_custom()] with a closure turning function names into function pointers.