Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: add Swift runtime rpaths to Tauri app binary

Louis Beaumont55856e226c0d
diff --git a/apps/screenpipe-app-tauri/src-tauri/build.rs b/apps/screenpipe-app-tauri/src-tauri/build.rs
index 7d606a3e7..da3bb9552 100644
--- a/apps/screenpipe-app-tauri/src-tauri/build.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/build.rs
@@ -1,5 +1,24 @@
fn main() {
#[cfg(target_os = "macos")]
- println!("cargo:rustc-link-lib=framework=AVFoundation");
+ {
+ println!("cargo:rustc-link-lib=framework=AVFoundation");
+
+ // Swift runtime rpaths — needed for apple-intelligence feature
+ // (libswift_Concurrency.dylib etc. live in these directories)
+ println!("cargo:rustc-link-arg=-Wl,-rpath,/usr/lib/swift");
+
+ if let Ok(output) = std::process::Command::new("xcode-select")
+ .arg("-p")
+ .output()
+ {
+ let xcode_dev = String::from_utf8_lossy(&output.stdout).trim().to_string();
+ let toolchain_swift = format!(
+ "{}/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/macosx",
+ xcode_dev
+ );
+ println!("cargo:rustc-link-arg=-Wl,-rpath,{}", toolchain_swift);
+ }
+ }
+
tauri_build::build()
}