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: create empty mlx.metallib placeholder on non-macOS builds

Louis Beaumontcacc341fe65b
diff --git a/apps/screenpipe-app-tauri/src-tauri/build.rs b/apps/screenpipe-app-tauri/src-tauri/build.rs
index c0dd06e30..7955ed1da 100644
--- a/apps/screenpipe-app-tauri/src-tauri/build.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/build.rs
@@ -392,6 +392,17 @@ fn main() {
}
}
+ // Ensure mlx.metallib exists so Tauri doesn't fail on the resource declaration.
+ // On non-aarch64-macOS builds, create an empty placeholder (it won't be used).
+ #[cfg(not(all(target_os = "macos", target_arch = "aarch64")))]
+ {
+ let manifest_dir = std::env::var("CARGO_MANIFEST_DIR").unwrap();
+ let metallib = std::path::Path::new(&manifest_dir).join("mlx.metallib");
+ if !metallib.exists() {
+ let _ = std::fs::write(&metallib, b"");
+ }
+ }
+
tauri_build::build()
}