aboutsummaryrefslogtreecommitdiffstats
path: root/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'build.rs')
-rw-r--r--build.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/build.rs b/build.rs
new file mode 100644
index 0000000..d2a0b5d
--- /dev/null
+++ b/build.rs
@@ -0,0 +1,18 @@
+extern crate cbindgen;
+
+use cbindgen::Language;
+
+fn main() {
+ let crate_dir = env!("CARGO_MANIFEST_DIR");
+
+ let config = cbindgen::Config::from_file("cbindgen.toml")
+ .expect("Failed to read 'cbindgen.toml'");
+
+ cbindgen::Builder::new()
+ .with_crate(crate_dir)
+ // .with_language(Language::C)
+ .with_config(config)
+ .generate()
+ .expect("Unable to generate bindings")
+ .write_to_file("dome_key_map.h");
+}