build.rs (718B)
1 //! Compiles the Objective-C CoreAudio tap shim and links the frameworks it needs. 2 //! macOS-only; a no-op elsewhere so the pure model layer still builds anywhere. 3 4 fn main() { 5 #[cfg(target_os = "macos")] 6 { 7 cc::Build::new() 8 .file("src/ffi/tap_shim.m") 9 .flag("-fobjc-arc") 10 .flag("-Wno-unused-parameter") 11 .compile("hydra_tap_shim"); 12 13 println!("cargo:rerun-if-changed=src/ffi/tap_shim.m"); 14 println!("cargo:rustc-link-lib=framework=Foundation"); 15 println!("cargo:rustc-link-lib=framework=AppKit"); 16 println!("cargo:rustc-link-lib=framework=CoreFoundation"); 17 println!("cargo:rustc-link-lib=framework=CoreAudio"); 18 } 19 }