how is compile of .metal files done in the project? #54
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
it seems it is done in the objective C shim for the metal stuff. The question is, if that has to be that way, or if we can actually compile them ahead of time and just deliver the binaries inside the bundle. what has to be made sure, the execution of the app must not require build tools. users might use this agent just for python code or shell scripts, so there is not necessarily the need for xcode tools, so we can't require them as something that must be there.
Findings:
build.rscompiles only the Objective-C bridge (ds4_metal.m). It does not compile the.metalkernels.cargo-packagercopies the 19.metalfiles intoDS4Server.app/Contents/Resources/metal.newLibraryWithSource:options:error:. There is no runtime invocation ofxcrun,metal, Clang, Xcode, Cargo, or another build tool./bin/sh,/usr/bin/grep,/bin/date,/bin/kill, andopenare supplied by macOS..metallib, and that may reduce first-use compilation time, but it is not necessary to meet the requirement that end users need no build tools. It would also need to preserve the current runtime-selected Metal 4 and diagnostic macro variants and DS4 behavior, so it should be treated as a separate performance change if desired.README wording should distinguish packaged-app runtime requirements (macOS 13+, Apple silicon/Metal, a supported GGUF model and adequate storage/memory; optional Chrome for web tools) from build-from-source requirements (Rust 1.97, cargo-packager 0.11.8, and Xcode or Command Line Tools).