diff --git a/src/ffi.rs b/src/ffi.rs new file mode 100644 index 0000000..798fdf7 --- /dev/null +++ b/src/ffi.rs @@ -0,0 +1,14 @@ +#![allow(non_upper_case_globals)] +#![allow(non_camel_case_types)] +#![allow(non_snake_case)] +#![allow(unused_imports)] +#![allow(dead_code)] +include!(concat!(env!("OUT_DIR"), "/glfw_vk_bindings.rs")); + +pub fn VK_MAKE_VERSION(major: u32, minor: u32, patch: u32) -> u32 { + (major << 22) | (minor << 12) | patch +} + +pub fn VK_MAKE_API_VERSION(variant: u32, major: u32, minor: u32, patch: u32) -> u32 { + (variant << 29) | (major << 22) | (minor << 12) | patch +} diff --git a/src/main.rs b/src/main.rs index 3135e9a..d1ae0ed 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,19 +1,4 @@ -mod ffi { - #![allow(non_upper_case_globals)] - #![allow(non_camel_case_types)] - #![allow(non_snake_case)] - #![allow(unused_imports)] - #![allow(dead_code)] - include!(concat!(env!("OUT_DIR"), "/glfw_vk_bindings.rs")); - - pub fn VK_MAKE_VERSION(major: u32, minor: u32, patch: u32) -> u32 { - (major << 22) | (minor << 12) | patch - } - - pub fn VK_MAKE_API_VERSION(variant: u32, major: u32, minor: u32, patch: u32) -> u32 { - (variant << 29) | (major << 22) | (minor << 12) | patch - } -} +mod ffi; use std::collections::HashSet; use std::ffi::{CStr, CString};