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 this crate
VulkanResult: Idiomatic wrapper around a Vulkan Resultsurface: Create aSurfaceKHRusing aRawWindowHandle(adapted fromash-window)- Generated code distributed into multiple modules
- Function loading (
CoreLoader,InstanceLoader,DeviceLoader) - Seperate
FlagsandFlagBitstypes - A high level
Builderfor every struct - Type-safe pointer chain support
DefaultandDebugimplementation for every type- Complete auto-generation of everything except
utils
Example: Instance Creation
use ;
let mut core = new?;
core.load_vk1_0?;
let app_info = new.api_version;
let instance_info = new.application_info;
let instance_handle = try_vk!;
let mut instance = new?;
instance.load_vk1_0?;
// ...
instance.destroy_instance;
Additional examples
Cargo Features
surface(enabled by default): Enables thesurfacemodule, addsraw-window-handledependencyloading(enabled by default): Enables theCoreLoader::newfunction, addslibloadingdependency
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 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 (which is not visible to the end user), having faster compile times and some more smaller improvements. On the other hand ash has a bigger existing community.
Q: How do the compile times compare to ash?
A: erupt 0.4.0+137 compiles in around 72% of the time it takes for ash 0.30.0 to compile, tested on
Linux with rustc nightly 1.44.0 using -Ztimings=info.
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.
Thank you
vk-parsefor helping parsevk.xmlin thegeneratorashfor helping inspiring and making this cratelibloadingfor providing symbol loadingash-windowfor providing a base for thesurfacemodulebitflagsfor 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.