[][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
  • Generated code distributed into multiple modules
  • Function loading (CoreLoader, InstanceLoader, DeviceLoader)
  • Seperate Flags and FlagBits types
  • A high level Builder for every struct
  • Type-safe pointer chain support
  • Default and Debug 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

Thank you

  • vk-parse for helping parse vk.xml in the generator
  • ash for helping inspiring and making this crate
  • libloading for providing symbol loading
  • ash-window for providing a base for the surface module
  • bitflags 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 MIT License.

Modules

extensions

Provides Vulkan extension items

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 *const std::os::raw::c_char from a string

Structs

CoreLoader

Loader for Core Commands

DeviceLoader

Loader for Device Commands. Must outlive InstanceLoader

InstanceLoader

Loader for Instance Commands. Must outlive CoreLoader

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