ash-rs / ash

Vulkan bindings for Rust
Apache License 2.0
1.82k stars 186 forks source link

Unify extension module hierarchies #894

Closed Ralith closed 6 months ago

Ralith commented 6 months ago

Fixes https://github.com/ash-rs/ash/issues/876.

As a bonus, this significantly reduces the amount of boilerplate required to wrap a new extension.

Ralith commented 6 months ago

Updated changelog.

Ralith commented 6 months ago

Revised approach: all core and extension raw type definitions and constants are exported directly under ash::vk. This includes e.g. extension name constants, which are named in the upstream style, less VK_. Extensions modules are exported under ash::{khr, ext, ...}, and include high-level wrappers, *Fn tables, and NAME and SPEC_VERSION reexports. Core *Fn structs are exported directly under ash.

This standardizes ash::vk as being purely unopinionated "sys" style bindings, while everything else is exposed under ash. We accept a small risk of a name collision between a future vendor tag and any other items we want to expose at the crate level.