blob: 68a3f3c7eaaa54f33a6ac53530e0ce172a1f55d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
extern crate bindgen;
use std::env;
use std::path::PathBuf;
fn main() {
let bindings = bindgen::Builder::default()
.header("linux_input_wrapper.h")
.allowlist_type("input_event")
.allowlist_var("KEY_.*")
.allowlist_var("EV_.*")
.generate()
.expect("Unable to generate bindings");
let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());
bindings.write_to_file(out_path.join("bindings.rs"))
.expect("Couldn't write bindings!");
}
|