spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.33k stars 3.05k forks source link

Native Apple Silicon Support (m1, arm) #7557

Open fishcharlie opened 2 years ago

fishcharlie commented 2 years ago

Electrum should release a Universal or separate Apple Silicon build of the application. This would allow users to use the application with increased performance without having to rely on Rosetta 2.

SomberNight commented 2 years ago

Contributions are welcome.

ballo commented 1 year ago

pyinstaller can build native binaries BTW https://github.com/pyinstaller/pyinstaller/issues/5315

Ishaanahuja7 commented 1 year ago

Any update on this? Qt 5.15.9 community version also supports building on apple silicon now natively. Official Qt download link here

Ishaanahuja7 commented 1 year ago

@SomberNight

SomberNight commented 1 year ago

Feel free to try to adapt the build scripts and open a PR.

Again, the number one criteria is that the build should stay reproducible. Also, our current build machines are amd64-based - is it possible to build on those while targeting arm?

Ishaanahuja7 commented 1 year ago

Yes, arm64 can be built from amd64 mac. But min mac os then needs to be updated to 10.15+ and which requires xcode 12.2. Builds will be reproducible as in the amd64 mac case so that shouldn't be an issue.

Ishaanahuja7 commented 9 months ago

Any updates on this yet? @SomberNight

SomberNight commented 9 months ago

We will be moving the build system for the mac binary to a new VM (macOS 10.14.6, xcode 11.3.1 -> macOS 11.7.10, xcode 13.2). See https://github.com/spesmilo/electrum/pull/8738 This itself is unrelated to arm64.

However, as part of that change, we accidentally bumped into a reproducibility failure that was caused precisely due to compiling some .so files as universal (x86_64+arm64) instead of just x86_64. We had to specifically disable that, to make it reproducible. See https://github.com/spesmilo/electrum/pull/8738/commits/77f84060f459af7e8b274ef1be5dbb65298e6901

Any updates on this yet?

Please take a look at that commit and try to make hid.so build reproducibly as a universal binary. Pull request welcome.

Ishaanahuja7 commented 9 months ago

Thanks a lot for adding initial support for apple silicon macs @SomberNight. According to @ecdsa, hid.cpython-310-darwin.so is reproducible https://github.com/spesmilo/electrum/pull/8738#issuecomment-1851821524. Can you enable universal builds now?

ecdsa commented 8 months ago

@Ishaanahuja7 No, I wrote that this file is reproducible because the native support has been disabled.

Ishaanahuja7 commented 8 months ago

@ecdsa Sorry my bad