//! The WebGPU provider's library is a shared one, which `ort/copy-dylibs` links beside the //! binary. A binary looks there only if told to, so this gives it that search path. fn main() { println!("cargo:rerun-if-changed=build.rs"); if std::env::var_os("CARGO_FEATURE_WEBGPU").is_none() { return; } match std::env::var("CARGO_CFG_TARGET_OS").as_deref() { Ok("macos") => println!("cargo:rustc-link-arg-bins=-Wl,-rpath,@loader_path"), Ok("linux") => println!("cargo:rustc-link-arg-bins=-Wl,-rpath,$ORIGIN"), _ => {} } }