bandwhich
bandwhich copied to clipboard
Add support/binary for ARM
I have some cloudservers/VPS running on ARM CPUs, so bandwhich in precompiled version for x86_64 don't run there:
[🇩🇪 -fsn] ✔ ~ [master|✔] 13:05 # bin/bandwhich -bash: bin/bandwhich: cannot execute binary file: Exec format error
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Vendor ID: ARM
Model name: Neoverse-N1
Because I don't want to install compilers and stuff on my cloudserver(s) could you please be so kind and add an precompiled version for ARM? Thanks a lot 😘
I used cargo-zigbuild to crosscompile to arm and it worked fine before, ripgrep seems to use qemu + cargo cross for this.
Any preference @cyqsimon ?
Sharkdp is also using cargo cross for his projects, so probably that's what we should do.
But I see that ripgrep and bat for example both don't compile arm mac from ci , maybe it's a limitation of cross. (ripgrep provides locally built binaries)
cargo-zigbuild can cross compile to mac arm
I'm not so deep in processor architecture, but my VPS is "based on Ampere® Altra® processors" (Hetzner.de) - and I'm not sure what ARM-Macs are based on…
I just menitoned macos arm because if we're going to add more architectures, we might as well add it , since its a popular one (mac m1 m2 etc are arm)
Can you confirm, that your system is just aarch64-linux ? you can compile a hello world binary and compile it to on another pc like this
rustup target add aarch64-unknown-linux-musl
cargo b --target aarch64-unknown-linux-musl
Any preference @cyqsimon ?
Nah not really. Anything that works and is reasonably maintainable floats my boat.
I was looking at ouch yesterday and they seem to have a working cross-compile setup too. FYR.
I just menitoned macos arm because if we're going to add more architectures, we might as well add it , since its a popular one (mac m1 m2 etc are arm)
Can you confirm, that your system is just aarch64-linux ? you can compile a hello world binary and compile it to on another pc like this
rustup target add aarch64-unknown-linux-musl cargo b --target aarch64-unknown-linux-musl
It is just aarch64 as I ordered it at Hetzner:
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Vendor ID: ARM
Model name: Neoverse-N1
@sigmaSd do you have any news regarding a precompiled arm-version yet? Working on it? Thinking about it? Dismissing it?
Unfortunately I haven't looked at this yet, but I saw @cyqsimon refactored ouch repo GitHub action, maybe its easy to copy the relèvent parts
It won't handle mac os arm binaries, but we can leave that until someone need it, arm Linux is a good start ( For building mac arm the only way for now I know of is using cargo zig build)
I agree that arm Linux would be a great start 👍🏼
Hello. With #384 merged the groundwork is done for more cross builds. @cyqsimon mentioned that they would like to refactor the CI layout but with the current setup builds for arm(s) is trivial if someone want's to catch up. draft result
Cool, also I just noticed that github action now supply free m1 runner (name macos-14) which can be used to compile natively for macos arm
Not sure why #401 didn't close this. Closing manually.
Cross compilation instructions are now in README, and prebuilt binaries should be available starting from next point release.