| Crates.io | vulkanalia-bootstrap |
| lib.rs | vulkanalia-bootstrap |
| version | 0.1.5 |
| created_at | 2025-08-25 11:58:45.369344+00 |
| updated_at | 2025-11-03 08:27:33.025831+00 |
| description | A utility library that jump starts initialization of Vulkan via Vulkanalia |
| homepage | https://github.com/ddorstijn/vulkanalia-bootstrap |
| repository | https://github.com/ddorstijn/vulkanalia-bootstrap |
| max_upload_size | |
| id | 1809450 |
| size | 206,557 |
Vulkanalia Bootstrap Vulkanalia Bootstrap is a utility library that jump starts initialization of Vulkan via the Vulkanalia bindings.
Note: This is a quick and dirty fork of ash bootrstrap. I really appreciate the way Vulkanalia implements its API and I felt the only thing holding me back was the missing bootstrap library. So I went ahead and decided to create it myself. Feel free to use it as a quick starter. I will try to keep it somewhat up-to-date with ash-bootrstrap. Feel free to send improvements through a pull-request.
[dependencies]
vulkanalia_bootstrap = "0.1.5"
Streamlined Vulkan initialization: Simplifies instance, device, and queue setup
Window integration: Built-in support for surface creation via vulkanalia::window
Tracing support: Optional integration with tracing crate
Portability: macOS compatibility via portability feature Not tested
fn main() -> anyhow::Result<()> {
let instance = InstanceBuilder::new(None)
.app_name("Example Vulkan Application")
.engine_name("Example Vulkan Engine")
.request_validation_layers(true)
.use_default_tracing_messenger()
.build()?;
let physical_device = PhysicalDeviceSelector::new(instance.clone())
.preferred_device_type(PreferredDeviceType::Discrete)
.select()?;
let device = Arc::new(DeviceBuilder::new(physical_device, instance.clone()).build()?);
// You can get the inner handle that is used by vulkan
// Or you can just pass it where the device handle is expected, because it implements AsRef.
let _device_handle = device.handle();
let (_graphics_queue_index, _graphics_queue) = device.get_queue(QueueType::Graphics)?;
let swapchain_builder = SwapchainBuilder::new(instance.clone(), device.clone());
let swapchain = swapchain_builder.build()?;
// And right now we got rid of 400-500 lines of vulkan boilerplate just like that.
// Now let's cleanup.
swapchain.destroy();
device.destroy();
instance.destroy();
}
For more examples make sure to check examples directory.