ash-direct-entry

Crates.ioash-direct-entry
lib.rsash-direct-entry
version0.2.0
sourcesrc
created_at2021-07-28 21:26:44.920628
updated_at2021-08-16 00:17:20.854172
descriptionAn ash::EntryCustom that directly links to libvulkan.so.
homepagehttps://sr.ht/~remexre/ash-direct-entry
repository
max_upload_size
id428485
size16,210
all (github:tangramdotdev:all)

documentation

README

ash-direct-entry

This crate provides an EntryCustom that directly links to libvulkan, so situations where dlopen()-ing it is undesirable (e.g. NixOS) can be avoided.

Example

use ash::vk;
use ash_direct_entry::LibVulkan;

fn main() {
    let entry = LibVulkan::entry();

    let app_info = vk::ApplicationInfo {
        api_version: vk::make_api_version(0, 1, 0, 0),
        ..Default::default()
    };
    let create_info = vk::InstanceCreateInfo {
        p_application_info: &app_info,
        ..Default::default()
    };
    unsafe {
        entry.create_instance(&create_info, None).unwrap();
    }
}
Commit count: 0

cargo fmt