fd
fd copied to clipboard
Apple Silicon GitHub release?
Looking in the GitHub releases, I don't see one for Apple Silicon. I might be overlooking it? I'm not sure. If I'm overlooking it, please let me know which artifact supports Apple Silicon. If it's not there, then would it be too much trouble to ask for it to be built into the GitHub releases in the near future?
I think this will be very easy to implement once Github Actions has Apple Sillicon runners: https://github.com/actions/runner-images/issues/2187 https://github.com/github/roadmap/issues/528
From what I can see, it does not have an exact release yet. Set for the future in the roadmap. Only supported for self-hosted runners as of now.
Another option would be to cross-compile, but that would probably require some more setup.
We already use cargo cross
for cross-compilation. But I'm not sure if aarch64-apple-darwin
is supported out of the box. It seems like it needs some macOS SDK?! (https://github.com/cross-rs/cross/issues/508)
Would be easy to check though, if someone wants to pick this up. Just try to add the new architecture somewhere here: https://github.com/sharkdp/fd/blob/a0062b9a1be36a4b1072b8e476462f71c3a1f78a/.github/workflows/CICD.yml#L75-L86
It seems like it needs some macOS SDK?! (cross-rs/cross#508)
The macOS SDK is installed on GitHub Actions macOS runners. (You actually probably need it to use Rust at all on macOS.)
@sharkdp Just coming by and I want to mention that it's possible to have ASi binaries compiled today on GitHub CI (I didn't even bother with cargo cross
), and this is what I have been doing with my own project for months:
- name: Set macOS environment variables
# if: runner.os == 'macOS'
run: |
echo "SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path)" >> $GITHUB_ENV
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version)" >> $GITHUB_ENV
- name: Test build for aarch64
run: cargo build --verbose --release --locked --target=aarch64-apple-darwin
https://github.com/rami3l/pacaptr/blob/71eca518382fd24c26bef05b45b9173921e4cc18/.github/workflows/test.yml#L84-L97
... and then you can easily make a fat binary with the lipo
tool:
lipo -create -output {out} {in1} {in2}
Brew provide the package, but I also hope the arm64 darwin release.
> whereis fd
fd: /opt/homebrew/bin/fd
> file /opt/homebrew/bin/fd
/opt/homebrew/bin/fd: Mach-O 64-bit executable arm64
I'm personally not going to work on this, but please go ahead and add this to the CI pipeline if you are interested.