2 releases

Uses old Rust 2015

0.3.1 Mar 25, 2018
0.3.0 Mar 25, 2018

#939 in Graphics APIs

Download history 47/week @ 2024-07-19 81/week @ 2024-07-26 48/week @ 2024-08-02 50/week @ 2024-08-09 166/week @ 2024-08-16 57/week @ 2024-08-23 60/week @ 2024-08-30 23/week @ 2024-09-06 69/week @ 2024-09-13 191/week @ 2024-09-20 77/week @ 2024-09-27 68/week @ 2024-10-04 101/week @ 2024-10-11 53/week @ 2024-10-18 38/week @ 2024-10-25 41/week @ 2024-11-01

237 downloads per month
Used in vk-parse

MIT license

29KB
445 lines

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);
}

Dependencies

~0.3–1MB
~21K SLoC