fix: don't attempt to create folder in build.rs

This commit is contained in:
Naxdy 2024-10-29 19:21:57 +01:00
parent a223badc06
commit 1fa5a12e27
Signed by: Naxdy
GPG key ID: CC15075846BCE91B

View file

@ -5,14 +5,6 @@ use std::{
};
fn main() {
fs::create_dir_all("build").expect("could not create build path");
let int_path = PathBuf::from("build")
.canonicalize()
.expect("cannot canonicalize path");
set_current_dir(int_path.clone()).expect("failed to change current directory");
let wiringop_path = PathBuf::from(
env::var("WIRINGOP_PATH").expect("could not retrieve wiringOP path from env"),
)
@ -37,7 +29,7 @@ fn main() {
cc.static_flag(true).compile("wiringop");
let builder = bindgen::Builder::default()
.header("../ffi/wrapper.h")
.header("./ffi/wrapper.h")
.detect_include_paths(true);
let bindings = builder