packr icon indicating copy to clipboard operation
packr copied to clipboard

Support for macOS ARM binaries

Open kurisubrooks opened this issue 4 years ago • 4 comments

Currently, packr builds all .app binaries as Application (Intel) binaries, even from an M1 mac. Though the Intel build runs on ARM under Rosetta 2, the CPU and GPU usage on Idle are much much higher than running a native ARM binary.

image (built on an M1 mac)

Even when building with a zulu arm64 JDK build, we get errors saying "Wrong Architecture", as it's trying to run the binary as Intel, through Rosetta 2.

image

Is there any possibility of supporting M1 and Apple Silicon platforms going forward? We'd greatly appreciate your consideration.

kurisubrooks avatar Mar 16 '21 15:03 kurisubrooks

I'm sure someone will get Packr building for Apple aarch64 but I don't have the infrastructure or spare time to try and get it building and tested.

PRs a welcome.

karlsabo avatar Mar 17 '21 01:03 karlsabo

With Java 16 around the corner and jpackage entering production, that might be the better option for you.

karlsabo avatar Mar 17 '21 01:03 karlsabo

I'll definitely let our dev know but we're currently on Java 8 if I remember correctly, so this might be a bit of a bigger undertaking.

For the people who stumble upon the thread looking to add support without an M1 mac themselves, I believe you're able to build ARM binaries from Intel/x64 on Xcode 12.2 or newer.

kurisubrooks avatar Mar 17 '21 01:03 kurisubrooks

Not a PR per se, but I built a launcher in Rust which follows a similar api as packr's, I followed part of the packr launcher native code to write mine, and it builds on several platforms (including linux/macos aarm), maybe packr could use it and not have to deal with the native stuff anymore?

fourlastor avatar Nov 06 '23 12:11 fourlastor