// build.rs use cmake::Config; fn main() { // set target to thumbv8m.main-none-eabi // let out_dir = std::env::var("OUT_DIR").unwrap(); println!("cargo:rustc-cfg=feature=\"cortex-m\""); // Use cmake to build the C++ project let dst = Config::new("stm32u5").build(); // Tell Cargo where to find the compiled library println!("cargo:rustc-link-search=native={}", dst.display()); // get the out dir of dependcy `cortex-m` // println!("cargo:include={}", dst.display()); }