Joonas Javanainen 3ca1b7b4ec
Use automatically generated 1.71 bindings from 0.1-dev
This is the minimal first step that compiles but doesn't work
2019-06-26 23:14:14 +03:00

21 lines
689 B
Rust

extern crate imgui_sys_bindgen;
use imgui_sys_bindgen::generate_bindings;
use std::env;
fn main() {
let cwd = env::current_dir().expect("Failed to read current directory");
let sys_path = cwd
.join("..")
.join("imgui-sys")
.canonicalize()
.expect("Failed to find imgui-sys directory");
let bindings = generate_bindings(&sys_path.join("third-party").join("cimgui"))
.expect("Failed to generate bindings");
let output_path = sys_path.join("src").join("bindings.rs");
bindings
.write_to_file(&output_path)
.expect("Failed to write bindings");
println!("Wrote bindings to {}", output_path.to_string_lossy());
}