- Minor documentation updates.
DeviceMemory::mapis nowunsafe.Buffer::bind_memoryandImage::bind_memoryare now unsafe.
- Create a workspace, update readme, and other tweaks.
vkshas been updated to 0.21.0.- The
Windowtype and a few other xlib types have changed. voodoo_winithas been moved into its own crate.
All core and many extension functions have documentation links.
- Xlib types are temporarily fixed.
- Debug report printing can now be optionally enabled during instance creation
by passing
trueto theInstanceBuilder::print_debug_reportmethod. Enabling this automatically loads the necessary extensions and wires up a callback function which simply prints the messages to stdout. - Additional safe API functions have been added.
- The process of creating and accessing device queues has been redesigned. See
the
hello.rsexample for usage.
- An intuitive and idiomatic interface
- Zero additional overhead
- No unnecessary allocations
- No intermediate structs or extra copying
- Builders compile to direct assignment
- Thread-safe allocation / destruction
- Safety escape hatches available everywhere
- A minimum of boilerplate
- Non-opinionated and nothing hidden
- Complete API coverage
- Useful documentation
Ensure that Vulkan drivers are installed for your device. Add the following to your project's Cargo.toml:
[dependencies]
voodoo = "0.1"And add the following to your crate root (lib.rs or main.rs):
extern crate voodoo;Create an instance:
extern crate voodoo;
use voodoo::{Result as VdResult, Instance, ApplicationInfo, Loader};
use std::ffi::CString;
/// Initializes and returns a new loader and instance with all available
/// extension function pointers loaded.
fn init_instance() -> VdResult<Instance> {
let app_name = CString::new("Hello!")?;
let app_info = ApplicationInfo::builder()
.application_name(&app_name)
.application_version((1, 0, 0))
.api_version((1, 0, 0))
.build();
let loader = Loader::new()?;
Instance::builder()
.application_info(&app_info)
.enabled_extensions(&loader.enumerate_instance_extension_properties()?)
.build(loader)
}
fn main() {
let _instance = init_instance().unwrap();
}See hello.rs for a complete, working example adapted from
https://vulkan-tutorial.com/.
- API coverage:
- Core: 100%
- Extensions: 70%
- Documentation: 5%
- Stability: 90%