generator: Upgrade bindgen, heck and vk-parse

`heck` got its API slightly renamed, and `bindgen` fixed all code-smell
linter warnings in its output (except naming style, which is inherent).
This commit is contained in:
Marijn Suijten 2022-07-29 17:11:27 +02:00 committed by GitHub
parent e51e4158bd
commit 9cb6d386eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5738 additions and 4265 deletions

View file

@ -28,8 +28,6 @@ mod prelude;
pub use prelude::*;
/// Native bindings from Vulkan headers, generated by bindgen
#[allow(nonstandard_style)]
#[allow(deref_nullptr)]
#[allow(trivial_casts, trivial_numeric_casts)]
pub mod native;
mod platform_types;
pub use platform_types::*;

File diff suppressed because it is too large Load diff

View file

@ -5,15 +5,15 @@ authors = ["Maik Klein <maikklein@googlemail.com>"]
edition = "2018"
[dependencies]
bindgen = "0.58"
heck = "0.3"
bindgen = "0.60"
heck = "0.4"
itertools = "0.10"
nom = "7.1"
once_cell = "1.7"
proc-macro2 = "1.0"
quote = "1.0"
regex = "1.4"
vk-parse = { version = "0.6", features = ["vkxml-convert"] }
vk-parse = { version = "0.7", features = ["vkxml-convert"] }
vkxml = "0.3"
[dependencies.syn]

View file

@ -1,7 +1,7 @@
#![recursion_limit = "256"]
#![warn(trivial_casts, trivial_numeric_casts)]
use heck::{CamelCase, ShoutySnakeCase, SnakeCase};
use heck::{ToShoutySnakeCase, ToSnakeCase, ToUpperCamelCase};
use itertools::Itertools;
use nom::sequence::pair;
use nom::{
@ -1006,7 +1006,10 @@ pub fn generate_extension_commands<'a>(
let ident = format_ident!(
"{}Fn",
extension_name.to_camel_case().strip_prefix("Vk").unwrap()
extension_name
.to_upper_camel_case()
.strip_prefix("Vk")
.unwrap()
);
let fp = generate_function_pointers(ident.clone(), &commands, &aliases, fn_cache);