17 releases (breaking)

0.15.0 May 18, 2022
0.14.0 Jan 19, 2022
0.13.0 Dec 15, 2021
0.12.0 Oct 30, 2021
0.2.3 Nov 24, 2020

#108 in Graphics APIs

Download history 30/week @ 2022-02-02 19/week @ 2022-02-09 27/week @ 2022-02-16 43/week @ 2022-02-23 18/week @ 2022-03-02 28/week @ 2022-03-09 92/week @ 2022-03-16 66/week @ 2022-03-23 31/week @ 2022-03-30 36/week @ 2022-04-06 28/week @ 2022-04-13 24/week @ 2022-04-20 163/week @ 2022-04-27 144/week @ 2022-05-04 281/week @ 2022-05-11 136/week @ 2022-05-18

726 downloads per month

Apache-2.0

4MB
95K SLoC

vulkanalia

Crate Documentation CI MSRV

Vulkan bindings for Rust.

Released under the Apache License 2.0.

Heavily inspired by the ash crate.

Overview

vulkanalia-sys consists of the Vulkan types and command signatures generated from the Vulkan API Registry. If you want to use the raw Vulkan API and are willing to handle function loading yourself you can use this crate.

vulkanalia offers a fairly thin wrapper around vulkanalia-sys that handles function loading for you and makes the Vulkan API somewhat less error prone and more idiomatic to use from Rust. For a detailed overview of how vulkanalia wraps the Vulkan API, see the API Concepts section of the Overview chapter of the Vulkan tutorial which can be found here.

Cargo Features

The vulkanalia crate has the following notable Cargo features:

  • libloading (non-default) – enables integration with libloading (adds the LibloadingLoader struct which can be used to load the initial Vulkan commands from a Vulkan shared library)
  • window (non-default) – enables integration with raw-window-handle (adds the window module which can be used to create surfaces for windows from libraries that support raw-window-handle (e.g., winit)
  • provisional (non-default) – enables access to provisional Vulkan extensions (WARNING: these extensions are not guaranteed to be backwards compatible and are not intended to be used in production applications)

Example

See the examples directory for an implementation of the classic triangle example using vulkanalia.

Vulkan Tutorial

For users new to Vulkan, there is a complete adaptation of https://vulkan-tutorial.com by Alexander Overvoorde to use Rust and vulkanalia instead of C++. The published version of this tutorial can be found here and the sources for the tutorial (including standalone working code examples for each chapter) are in this repository in the tutorial directory.

Dependencies

~16–400KB