See also vulkano.rs.
Vulkano is a Rust wrapper around the Vulkan graphics API. It follows the Rust philosophy, which is that as long as you don't use unsafe code you shouldn't be able to trigger any undefined behavior. In the case of Vulkan, this means that non-unsafe code should always conform to valid API usage.
What does vulkano do?
- Provides a low-levelish API around Vulkan. It doesn't hide what it does but provides some comfort types.
- Plans to prevent all invalid API usages, even the most obscure ones. The purpose of Vulkano is not to simply let you draw a teapot, but to cover all possible usages of Vulkan and detect all the possible problems in order to write robust programs. Invalid API usage is prevented thanks to both compile-time checks and runtime checks.
- Can handle synchronization on the GPU side for you (unless you choose to do that yourself), as this aspect of Vulkan is both annoying to handle and error-prone. Dependencies between submissions are automatically detected, and semaphores are managed automatically. The behavior of the library can be customized thanks to unsafe trait implementations.
- Tries to be convenient to use. Nobody is going to use a library that requires you to browse the documentation for hours for every single operation.
Comparison to other well-known Graphics APIs in Rust ecosystem.
Name | Open-sourced Since | API Level | Notable Features |
---|---|---|---|
Vulkano | March, 2016 | High-level Rust API wrapping Vulkan APIs. | Type-safe compile-time shaders. Transparent interoperability with glsl and spir-v shader code types in Rust code. Automatically generated types for shader's Layout. |
Wgpu | May, 2019 | High-level Rust API with multiple backends. | Supports multiple backends: Vulkan, Metal, DirectX, WebGPU, and other. Follows WebGPU specification. With async/await API. |
Miniquad | March, 2020 | High-level minimalistic Rust API with multiple backends. | Relatively minimalistic API well suited for small to medium graphics projects. Supports multiple backends, including browser target. |
Sierra | March, 2021 | High-level Rust API for Vulkan/Metal APIs. | Layouts, Descriptors and shader Types construction in Rust code through the macro system. Built on top of Erupt. Supports Ray Tracing Pipeline. |
Glium | October, 2014 | High-level Rust API wrapping OpenGL | OpenGL only. |
Ash | August, 2016 | Low-level API for Vulkan. | Unsafe Vulkan API bindings. |
Erupt | April, 2020 | Low-level API for Vulkan. | Unsafe Vulkan API bindings. |
Please note that by the current date none of the known projects in the ecosystem(including Vulkano) reached stable release versions and the final design goal