2 releases

Uses old Rust 2015

0.3.1 Mar 25, 2018
0.3.0 Mar 25, 2018

#778 in Graphics APIs

Download history 299/week @ 2023-12-06 117/week @ 2023-12-13 85/week @ 2023-12-20 50/week @ 2023-12-27 108/week @ 2024-01-03 175/week @ 2024-01-10 126/week @ 2024-01-17 188/week @ 2024-01-24 89/week @ 2024-01-31 73/week @ 2024-02-07 106/week @ 2024-02-14 159/week @ 2024-02-21 252/week @ 2024-02-28 234/week @ 2024-03-06 506/week @ 2024-03-13 904/week @ 2024-03-20

1,936 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.5–1MB
~24K SLoC