Level/leveldown

Mac arm64 prebuild

dgrijuela opened this issue · 8 comments

I'm not being able to package an electron app for the new mac m1 chip. It says it couldn't find leveldown binaries for that system.

These are the binaries found:

Screen Shot 2021-06-10 at 10 11 34

Any help? Thanks :)

The ability to produce prebuilt binaries for M1 (Apple silicon) is blocked by actions/runner-images#2187.

Are you able to compile from source?

We might be able to cross-compile on an intel mac. Help is wanted, I don't own either.

The ability to produce prebuilt binaries for M1 (Apple silicon) is blocked by actions/virtual-environments#2187.

Are you able to compile from source?

I'll try to ask someone with the M1 do the npm i leveldown --build-from-source and post here the results. Thank you @vweevers

We might be able to cross-compile on an intel mac.

An easier option is to build "fat binaries" that work on both x64 and arm64. Here's how fsevents did it: fsevents/fsevents#350.

Tasks:

I can help with testing on Intel.

Testers wanted! On both Intel and M1. If you have such a machine, please run:

git clone --recurse-submodules https://github.com/Level/leveldown.git
cd leveldown
git checkout apple-silicon
npm i --ignore-scripts
npm run prebuild-darwin-x64+arm64
npm run test-prebuild

I can confirm the above steps worked on Apple M1 (updated the package.json to the newly released node-gyp-build 4.3.0).
I was able to manually add the prebuild to a universal osx electron app and it seems to be working. Thanks!