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: bundle mlx.metallib in app and CLI for parakeet-mlx

Louis Beaumont9eb8f56c3287
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index 532630950..f540ffc4b 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -909,6 +909,25 @@ jobs:
if bunx tauri build -v $TAURI_ARGS 2>&1 | tee /tmp/tauri-build-$attempt.log; then
echo "✅ Build succeeded on attempt $attempt"
cd ../..
+
+ # Bundle mlx.metallib into the .app for parakeet-mlx (macOS aarch64 only)
+ # MLX searches for mlx.metallib next to the binary before falling back to
+ # the hardcoded build path (which doesn't exist on user machines).
+ if [[ "${{ matrix.target }}" == "aarch64-apple-darwin" ]]; then
+ METALLIB=$(find "apps/screenpipe-app-tauri/src-tauri/target/${{ matrix.target }}/release/build" -path "*/mlx-sys-*/mlx.metallib" -print -quit 2>/dev/null)
+ if [ -n "$METALLIB" ]; then
+ APP_DIR=$(find "apps/screenpipe-app-tauri/src-tauri/target/${{ matrix.target }}/release/bundle" -name "screenpipe.app" -type d -print -quit 2>/dev/null)
+ if [ -n "$APP_DIR" ]; then
+ cp "$METALLIB" "$APP_DIR/Contents/MacOS/mlx.metallib"
+ echo "✅ Bundled mlx.metallib into $APP_DIR/Contents/MacOS/"
+ else
+ echo "⚠️ Could not find screenpipe.app bundle dir"
+ fi
+ else
+ echo "⚠️ mlx.metallib not found in build artifacts"
+ fi
+ fi
+
break
fi
cd ../..
diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml
index 9e985f239..bd512ee6d 100644
--- a/.github/workflows/release-cli.yml
+++ b/.github/workflows/release-cli.yml
@@ -202,6 +202,19 @@ jobs:
run: |
mkdir -p screenpipe-${{ env.VERSION }}-${{ matrix.target }}/bin
cp target/${{ matrix.target }}/release/screenpipe screenpipe-${{ env.VERSION }}-${{ matrix.target }}/bin/
+
+ # Bundle mlx.metallib next to CLI binary (macOS aarch64 only)
+ # MLX searches for mlx.metallib next to the binary at runtime
+ if [[ "${{ matrix.target }}" == "aarch64-apple-darwin" ]]; then
+ METALLIB=$(find "target/${{ matrix.target }}/release/build" -path "*/mlx-sys-*/mlx.metallib" -print -quit 2>/dev/null)
+ if [ -n "$METALLIB" ]; then
+ cp "$METALLIB" screenpipe-${{ env.VERSION }}-${{ matrix.target }}/bin/mlx.metallib
+ echo "✅ Bundled mlx.metallib for CLI"
+ else
+ echo "⚠️ mlx.metallib not found in build artifacts"
+ fi
+ fi
+
tar -czf screenpipe-${{ env.VERSION }}-${{ matrix.target }}.tar.gz -C screenpipe-${{ env.VERSION }}-${{ matrix.target }} .
- name: Calculate SHA256