vulkan_gen
Vulkan XML specification parser and Rust binding generator. Used internally
by the vulkane crate, but reusable as a
standalone code generator.
vulkan_gen parses vk.xml
into typed Rust structures and emits a complete vulkan_bindings.rs file
with every type, constant, struct, enum, function pointer, and dispatch
table the spec defines. The parser uses roxmltree
DOM parsing to correctly handle nested elements like <member> and
<param> that contain mixed text and child element content.
For end users targeting Vulkan from Rust, install the
vulkane crate instead — it includes
vulkan_gen as a build dependency and exposes both the raw bindings and
a complete safe RAII wrapper for compute and graphics.
Standalone usage
If you want to generate your own bindings:
use generate_bindings;
let xml_path = new;
let out_path = new;
generate_bindings?;
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT License (LICENSE-MIT)
at your option.