Expand description
Vulkan bindings for Rust, generated from the official
Vulkan-Headers vk.xml registry.
§Modules
vk– all Vulkan types, constants, function pointer types, and Vulkan-specific traits (Handle,ApiVersion,TaggedStructure,Extends, etc.), re-exported flat.util– SPIR-V decoding (read_spv).window– platform surface creation viaraw-window-handle(requireswindowfeature).
§Function tables
Each API version and extension defines its own InstanceFn / DeviceFn struct. Load them
with the LoadInstanceFn and LoadDeviceFn traits. Entry bootstraps the loading
chain.
§Quick start
ⓘ
use kazan::{Entry, LoadDeviceFn as _, LoadInstanceFn as _, vk::{self, vk1_0}};
let entry = unsafe { Entry::load()? };
let instance = entry.vk1_0.create_instance(&create_info, None)?;
let instance_fn = unsafe { vk1_0::InstanceFn::load(&entry, instance)? };
let device = unsafe { instance_fn.create_device(physical_device, &device_create_info, None)? };
let device_fn = unsafe { vk1_0::DeviceFn::load(&instance_fn, device)? };Re-exports§
Modules§
- util
- Utility functions (SPIR-V decoding).
- vk
- Vulkan types, constants, and function pointer tables.
- window
window - Platform surface creation via
raw-window-handle. Interop between kazan andraw_window_handle.
Macros§
- define_
extension_ set - Defines an extension set type with a built-in extension table and index lookup.
- match_
in_ struct - Given an immutable raw pointer to a type with an
s_typemember such asBaseInStructure, match on a set of Vulkan structures. The struct will be rebound to the given variable of the type of the given Vulkan structure. - match_
out_ struct - Given a mutable raw pointer to a type with an
s_typemember such asBaseOutStructure, match on a set of Vulkan structures. The struct will be rebound to the given variable of the type of the given Vulkan structure.
Structs§
- ArrayC
Str - A fixed-size, NUL-terminated C string stored inline in an array of
Nbytes. - CStr
TooLarge ForStatic Array - Error returned when a
CStris too large for a fixed-sizec_chararray. - Device
Extension Set - Entry
- Instance
Extension Set - Missing
Entry Point Error - Static
Fn - Unknown
Extension Error - Error returned when an unknown extension name is passed to an extension set.
Enums§
- Slice
OrLen - An array parameter where the length is meaningful even without data.
Traits§
- Enumerate
Into - Output buffer for Vulkan two-call enumerate commands.
- Load
Device Fn - Trait for dispatch tables loaded via
vkGetDeviceProcAddr. - Load
Instance Fn - Trait for dispatch tables loaded via
vkGetInstanceProcAddr. - RawMut
Ptr - Converts an optional mutable reference to a raw mutable pointer, returning null for
None. - RawPtr
- Converts an optional reference to a raw const pointer, returning null for
None.
Type Aliases§
- DWORD
- Display
- GgpFrame
Token - GgpStream
Descriptor - HANDLE
- HINSTANCE
- HMONITOR
- HWND
- IDirectFB
- IDirectFB
Surface - LPCWSTR
- NvSci
BufAttr List - NvSci
BufObj - NvSci
Sync Attr List - NvSci
Sync Fence - NvSci
Sync Obj - RROutput
- Result
- Convenience alias for
Result<T, vk::Result>. - SECURITY_
ATTRIBUTES - VisualID
- Window
- _screen_
buffer - _screen_
context - _screen_
window - ubm_
device - ubm_
surface - wl_
display - wl_
surface - xcb_
connection_ t - xcb_
visualid_ t - xcb_
window_ t - zx_
handle_ t