Crates.io | erupt-bootstrap |
lib.rs | erupt-bootstrap |
version | 0.3.0 |
source | src |
created_at | 2022-01-13 21:17:58.618536 |
updated_at | 2022-11-14 18:34:45.467059 |
description | vk-bootstrap for Rust |
homepage | |
repository | https://gitlab.com/Friz64/erupt-bootstrap |
max_upload_size | |
id | 513542 |
size | 230,663 |
Vulkan Bootstrapping library for Rust, inspired by vk-bootstrap
.
It is not recommended to use this for new projects, as erupt is in maintenance mode. There is work underway to rewrite ash using ideas from the erupt project, for updates see https://github.com/ash-rs/ash/issues/344. The functionality of erupt-bootstrap will be made available in some form or another again once this work is completed. Simple patches to erupt-bootstrap will still be merged, but no large changes are to be expected.
surface
(enabled by default): Enables the use of raw-window-handle
.let entry = erupt::EntryLoader::new().unwrap();
let instance_builder = InstanceBuilder::new()
.validation_layers(ValidationLayers::Request)
.request_debug_messenger(DebugMessenger::Default)
.require_surface_extensions(&window)
.unwrap();
let (instance, debug_messenger, instance_metadata) =
unsafe { instance_builder.build(&entry) }.unwrap();
let surface =
unsafe { erupt::utils::surface::create_surface(&instance, &window, None) }.unwrap();
let graphics_present = QueueFamilyCriteria::graphics_present();
let transfer = QueueFamilyCriteria::preferably_separate_transfer();
let device_features = vk::PhysicalDeviceFeatures2Builder::new()
.features(vk::PhysicalDeviceFeaturesBuilder::new().build());
let device_builder = DeviceBuilder::new()
.queue_family(graphics_present)
.queue_family(transfer)
.require_features(&device_features)
.for_surface(surface);
let (device, device_metadata) =
unsafe { device_builder.build(&instance, &instance_metadata) }.unwrap();
let graphics_present = device_metadata
.device_queue(&instance, &device, graphics_present, 0)
.unwrap()
.unwrap();
let transfer = device_metadata
.device_queue(&instance, &device, transfer, 0)
.unwrap()
.unwrap();
For more examples, visit the git repo.
The logo contains the Volcano Emoji of Twemoji (License). The name "erupt" was added on top of the volcano. The boot is the "Hiking Boot" from Openclipart, released into the Public Domain.
This project is licensed under the zlib License.
vk-bootstrap
, the inspiration of this project, is licensed under the MIT license.