erupt 0.2.0+137

Vulkan API bindings
Documentation

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 Result
  • surface: Create a SurfaceKHR using a RawWindowHandle (adapted from ash-window)
  • 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 zlib License.