| Crates.io | ash-bootstrap |
| lib.rs | ash-bootstrap |
| version | 0.1.3 |
| created_at | 2025-05-27 08:42:58.055326+00 |
| updated_at | 2025-07-09 15:47:32.07988+00 |
| description | A utility library that jump starts initialization of Vulkan via Ash |
| homepage | https://github.com/Drevoed/ash-bootstrap |
| repository | https://github.com/Drevoed/ash-bootstrap |
| max_upload_size | |
| id | 1690796 |
| size | 189,689 |
Ash Bootstrap Ash Bootstrap is a utility library that jump starts initialization of Vulkan via the Ash bindings.
[dependencies]
ash_bootstrap = "0.1.2"
Streamlined Vulkan initialization: Simplifies instance, device, and queue setup
Window integration: Built-in support for surface creation via ash-window
Tracing support: Optional integration with tracing crate
Portability: macOS compatibility via portability feature
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.