Like macOS universal app, an AppImage bundle both x86_64 and aarch64 binaries, and can run on both CPU architecture. This will make AppImage even more portable.
All reactions
Replies: 1 comment 3 replies
You're referring to what Apple calls a "fat binary". This simply doesn't exist in Linux, at least not standardized.
Attempts to bring this to Linux were made decades(!) ago with FatELF, but I'm not aware of any distributions that would ship support for it. (Technically, one could make this work with binfmt-misc, I suppose, but it would be a retrofit solution).
Therefore, there is no such tooling available. As long as fat binaries are not widely supported within Linux, there's not much of a point doing so other than a technical demo. And that wouldn't be worth it, really, we know that the concept works.
All reactions
Note: I'm referring to the runtime only. For the payload, you could ship different binaries that would be used on demand or just also fat binaries which would likely work automatically. But as long as the runtime isn't viable, there is no point in specifically adding support.
All reactions
What I imagine is:
- a x86_64 AppImage
- a aarch64 AppImage
- a bash script to execute specific AppImage on chosen platform
- wrap above files into another AppImage
This solution shouldn't require any extra support from GNU/Linux operating system.
All reactions
This can be done with a script on web without the need to create a duplicate appimage
like:
arch="$(uname -m)" case "$arch" in arm64* | linux-aarch64) arch="aarch64" ;; x86*) arch="x86_64" ;; *) echo "Unsupported platform or architecture" exit 1 ;; esac