vkxml

Crates.iovkxml
lib.rsvkxml
version0.3.1
sourcesrc
created_at2018-03-25 00:12:55.770241
updated_at2018-03-25 00:17:52.834171
descriptionParse vulkan's XML API registry.
homepage
repositoryhttps://github.com/terrybrashaw/vkxml
max_upload_size
id57280
size30,093
Terry Brashaw (terrybrashaw)

documentation

https://docs.rs/vkxml

README

vkxml

Documentation.

vkxml is a Serde Rust representation of the vk_new.xml file generated by https://github.com/NicolBolas/New-Vulkan-XML-Format.

vkxml has been made for use with serde-xml-rs and, because of some quirky attributes required by serde-xml-rs, most likely will not work with any other serde xml parser.

Usage

To get started, you'll need a copy of vk_new.xml which you can easily generate by following the directions on New-Vulkan-XML-Format. vk_new.xml is a lossless, reformatted version of Vulkan's vk.xml into something that's easier to parse.

After that, you can create your Rust project:

Cargo.toml

[dependencies]
serde-xml-rs = {git = "https://github.com/RReverser/serde-xml-rs.git"}
vkxml = {git = "https://github.com/terrybrashaw/vkxml"}

main.rs

extern crate serde_xml_rs;
extern crate vkxml;

fn main() {
    let xml = std::fs::File::open("vk_new.xml").unwrap();
    let spec: vkxml::Registry = serde_xml_rs::from_reader(xml).unwrap();
    println!("{:?}", spec);
}
Commit count: 21

cargo fmt