[−][src]Crate erupt
Vulkan API bindings
Features
- Full Vulkan API coverage
- First-class support for all extensions
- High quality auto-generated function wrappers
- A utility module aiding your use of the Vulkan API
VulkanResult
: Idiomatic wrapper around a Vulkan Resultsurface
: Create aSurfaceKHR
using aRawWindowHandle
(adapted fromash-window
)
- Generated code distributed into multiple modules
- Function loading (
CoreLoader
,InstanceLoader
,DeviceLoader
) - Seperate
Flags
andFlagBits
types - A high level
Builder
for every struct - Type-safe pointer chain support
Default
andDebug
implementation for every type- Complete auto-generation of everything except
utils
Example: Instance Creation
use erupt::{vk1_0::*, CoreLoader, InstanceLoader}; let mut core = CoreLoader::new()?; core.load_vk1_0()?; let app_info = ApplicationInfoBuilder::new().api_version(erupt::make_version(1, 0, 0)); let instance_info = InstanceCreateInfoBuilder::new().application_info(&app_info); let instance_handle = core .create_instance(&instance_info, None, None) .expect("Failed to create instance"); let mut instance = InstanceLoader::new(&core, instance_handle)?; instance.load_vk1_0()?; // ... instance.destroy_instance(None);
Additional examples
Cargo Features
surface
: Enables thesurface
module, addsraw-window-handle
dependency (Enabled by default)libloading
: Enables theCoreLoader::new
function, addslibloading
dependency (Enabled by default)
Thank you
vk-parse
for helping parsevk.xml
in thegenerator
ash
for helping inspiring and making this cratelibloading
for providing symbol loadingash-window
for providing a base for thesurface
modulebitflags
for providing a perfect bitflag macro- The Vulkan Community ❤️
- The Rust Community ❤️
Licensing
The logo is the Volcano Emoji of Twemoji (License). The name "erupt" was added on top of it.
This project is licensed under the zlib License.
Modules
extensions | Provides Vulkan extension items |
info | Generated from |
utils | Utilities to make working with Vulkan easier |
vk1_0 | Provides Vulkan feature items |
vk1_1 | Provides Vulkan feature items |
vk1_2 | Provides Vulkan feature items |
Macros
cstr | Construct a |
Structs
CoreLoader | Loader for Core Commands |
DeviceLoader | Loader for Device Commands. Must outlive |
InstanceLoader | Loader for Instance Commands. Must outlive |
Functions
make_version | Vulkan Manual Page · Const Function |
version_major | Vulkan Manual Page · Const Function |
version_minor | Vulkan Manual Page · Const Function |
version_patch | Vulkan Manual Page · Const Function |