fn main() { let status = std::process::Command::new("ceedling") .arg("release") .current_dir("./algorithms-c/") .status() .expect("could not make c stuff"); if !status.success() { panic!("make returned an error") } let cwd = std::env::current_dir().unwrap().display().to_string(); let libpath_s = format!("{cwd}/algorithms-c/build/artifacts/release/libalgorithms.a"); let libpath = std::path::Path::new(&libpath_s); assert!(libpath.exists()); println!("cargo::rustc-link-lib=algorithms"); println!("cargo::rerun-if-changed={cwd}/algorithms-c/src/"); println!( "cargo::rustc-link-search={}", libpath.parent().unwrap().display() ); }