bluetooth-sys 0.1.3

Unsafe bindings to Linux's C bluetooth API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::{env, path::PathBuf};

fn main() {
  println!("cargo:rustc-link-lib=bluetooth");
  println!("cargo:rerun-if-changed=wrapper.h");

  bindgen::Builder::default()
    .header("wrapper.h")
    .parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
    .generate()
    .expect("Failed to generate bindings.")
    .write_to_file(PathBuf::from(env::var("OUT_DIR").unwrap()).join("bindings.rs"))
    .expect("Failed to write generated output.");
}