19 breaking releases

0.20.0+190 Aug 30, 2021
0.19.0+182 Jun 21, 2021
0.18.0+174 Mar 29, 2021
0.16.0+162 Nov 23, 2020
0.11.0+148 Jul 21, 2020

#38 in Graphics APIs

Download history 49/week @ 2021-07-04 56/week @ 2021-07-11 97/week @ 2021-07-18 83/week @ 2021-07-25 113/week @ 2021-08-01 63/week @ 2021-08-08 98/week @ 2021-08-15 72/week @ 2021-08-22 88/week @ 2021-08-29 26/week @ 2021-09-05 34/week @ 2021-09-12 51/week @ 2021-09-19 37/week @ 2021-09-26 37/week @ 2021-10-03 73/week @ 2021-10-10 40/week @ 2021-10-17

309 downloads per month
Used in 7 crates (6 directly)

Zlib license

5MB
90K SLoC

erupt

docs.rs crates.io

Vulkan API bindings

Take a look at the erupt user guide.

Features

  • Full Vulkan API coverage
  • First-class support for all extensions
  • High quality auto-generated function wrappers
  • A utility module aiding your use of this crate
  • Generated code distributed into multiple modules
  • Function loading (EntryLoader, 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
  • Confirmed support for Linux, Windows, macOS and Android
  • Complete auto-generation of everything except utils

Example: Instance Creation

use erupt::{vk, EntryLoader, InstanceLoader};

let entry = EntryLoader::new()?;

let app_info = vk::ApplicationInfoBuilder::new()
    .api_version(vk::API_VERSION_1_1);
let instance_info = vk::InstanceCreateInfoBuilder::new()
    .application_info(&app_info);
let instance = InstanceLoader::new(&entry, &instance_info, None)?;

// ...

instance.destroy_instance(None);

Additional examples

Cargo Features

FAQ

Q: What's the difference between this, ash and vulkano?

A: Vulkano is special because it provides hand-written Vulkan wrappers, which means that for example it has a special hand-written wrapper around a Vulkan PhysicalDevice. On the other hand ash and erupt both provide Vulkan API bindings too, but not exposing such fancy wrappers and instead focusing on having good bindings to the raw Vulkan API.

The big selling points of erupt is that it has better documentation, high level function support for all extensions (which is only really relevant if you use those extensions), being fully generated and some more smaller improvements. On the other hand ash has a bigger existing community.

Q: What does the number at the end of the version mean?

A: It represents the Vulkan Header version this version of erupt was generated against and is purely informational.

Q: I need to easily allocate memory, what should i use?

A: Take a look at gpu-alloc, vk-alloc for Rust-native solutions and vk-mem-erupt for bindings to the C++ Vulkan Memory Allocator (VMA) library.

Minimum Supported Rust Version (MSRV)

Rust 1.48 or higher.

Thank you

  • 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.

Dependencies