Apple Silicon / M1 standalone binary?
Any plans to build a native Apple Silicon standalone binary? I believe arm64 works right? Happy to try and contribute this if I can get some direction and hand holding.
It looks like github actions made some progress on it but is currently blocked waiting for dotnet core 6 release scheduled for the end of the year. We want to support it, but there is a limited amount of effort that I'm personally willing to spend on it. I would say that a PR is welcome, but if it's as hard as I think it is, the changeset would be huge and it would pollute our nice readable code with a bunch of if statements. Therefore I think we should wait for github actions to support the build target properly.
For now I can only suggest:
- a pure python installation via
pip3 install --user b2 - a local or remote VM
- some compatibility layer like qemu
MacBook-Pro ➜ ~ pip3 install b2
Seems to have worked. But what is this sorcery 🎃 ? Is it running Apple Silicon native now?
MacBook-Pro ➜ ~ which b2
/opt/homebrew/bin/b2
MacBook-Pro ➜ ~ file /opt/homebrew/bin/b2
/opt/homebrew/bin/b2: Python script text executable, ASCII text
You have a native cpython3 executable interpreting (portable) python code
@ppolewicz got it. But when I download the release from https://github.com/Backblaze/B2_Command_Line_Tool/releases/download/v3.2.0/b2-darwin and chmod +x it and run file on that I see:
MacBook-Pro ➜ bin file /usr/local/bin/b2
/usr/local/bin/b2: Mach-O 64-bit executable x86_64
Yes, that's the binary release. pip3 installs the source code which is the interpreted using the python3 binary in your operating system. I guess osx installed the python3 compiled for M1 for you already.
Please note the "standalone" binary is mostly for install convince and does not offer any performance benefits. While we are open to contributions implementing this, we have no plans to do so ourselves.
If someone wants to tackle implementing standalone for Apple ARM, make sure to first read about potential hurdles listed in https://github.com/Backblaze/B2_Command_Line_Tool/issues/794 .