Feature request: Universal Binary

Is it possible that Canonical could implement an option to build a cross architecture (arm64 and x64) at once inside one file like Apple do on their new Universal Binary format?

What you want is FatELF:

https://icculus.org/fatelf/

1 Like

This is not maintained any more.
I mean to create a “standard” inside the snap

you can definitely have a multiarch snap today already and ship all possible architecture binaries and libs inside … problem here is that this will be gigantic for no benefit for the user (she will have to download and store a 4x bigger snap of which she will only ever use 1/4 of the content)

1 Like

Thanks!
I’m trying to develop a snap, but my root drive is going to be full!
Is there a possible way to changing the snap working directory?
(My project is on another drive)

But It could be an easier way for distributing apps for a lot of people that doesn’t know which architecture they have.

Kinda like the way that they don’t have to know about what architecture they have to install Snap packages?

3 Likes

I think this is vague, and could be worded better.

Put better. The snap find and snap install commands already only show packages which are available for the architecture you’re running at the time. For example here’s me running snap info spot on a desktop:

  latest/stable:    0.1.9            2021-03-03 (27) 5MB -
  latest/candidate: ↑                                    
  latest/beta:      ↑                                    
  latest/edge:      0.1.9-5-g83af321 2021-03-04 (31) 5MB -

Here’s the same command run on a Raspberry Pi (arm64).

channels:
  latest/stable:    0.1.9             2021-03-03 (29) 5MB -
  latest/candidate: ↑                                     
  latest/beta:      ↑                                     
  latest/edge:      0.1.9-5-g83af321  2021-03-04 (32) 5MB -

Notice while version numbers are the same, the revision numbers are different. Revision 29 and 32 are arm64 builds, where builds 27 and 31 are amd64 builds.

I could have build these snaps with both arm64 and amd64 binaries and libraries inside, but that would double the size of them, and thus mean Pi users would have a bunch of amd64 binaries on disk they’d never use, and vice versa.

4 Likes

Thank you for your answer.
But I mean for a distribution outside the snap store.