Skip to content

Commit ac6d84f

Browse files
juntaoclaude
andcommitted
Bundle mlx.metallib in macOS release package
The Metal shader library (mlx.metallib) is generated when mlx-c is built from source via CMake. dylibbundler only handles dylibs, so the metallib must be copied separately into lib/ for the release to be fully portable without a system MLX installation. Signed-off-by: Michael Yuan <michael@secondstate.io> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c269ef6 commit ac6d84f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ jobs:
226226
--dest-dir "$DIR/lib" \
227227
--install-path @loader_path/lib
228228
229+
# Metal shader library — compiled when mlx-c is built from source.
230+
# dylibbundler only handles dylibs; the metallib must be copied separately.
231+
find /opt/mlx -name "*.metallib" -exec cp {} "$DIR/lib/" \;
232+
find "$(brew --prefix mlx)" -name "*.metallib" -exec cp {} "$DIR/lib/" \;
233+
ls -lh "$DIR/lib/"
234+
229235
zip -r "$DIR.zip" "$DIR"
230236
echo "=== Package contents ==="
231237
zipinfo "$DIR.zip" | head -30

0 commit comments

Comments
 (0)