-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider using DwarFS #36
Comments
I have done some informal tests on some AppImages I have lying around. MB are megabytes, not mebibytes. Cryptomator FontForge Inkscape LibreOffice qView VSCodium In the median case, the DwarFS image is 27% smaller and loads 10% faster. AppDwarf creates an .sh file which you cannot simply mark as executable and launch from Nautilus. Furthermore, installing DwarFS requires manually adding it to PATH. However, if DwarFS were used in AppImage, I assume you could solve these issues. Switching from SquashFS to DwarFS is a no-brainer which improves the AppImage format without drawbacks. |
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. |
There is now an appimage runtime that supports dwarfs written in rust: https://github.com/VHSgunzo/uruntime Here are some tests using the latest
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. |
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 TLDR: dwarfs is 9% smaller and 21% faster |
I made 2 dwarfs appimages that use this runtime: https://github.com/Samueru-sama/GIMP-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. |
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. |
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 👍 |
sharun is just a binary that you symlink to inside the AppDir and based on the name of the symlink it will find the 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. |
@Samueru-sama does your sharun approach work with applications that need GLX, like https://github.com/AlbrechtL/welle.io/? Reference: |
Yes, you can see it in the OBS Studio AppImage I bundled the gpu libs and set The deploy script that sharun uses an script, named 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 |
@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:
And here is the appimage if anyone wants to do a quick test |
https://github.com/mhx/dwarfs is making bold claims:
It'd be interesting to do some real-world comparisons by recompressing existing AppImages in DwarFS.
Reference:
The text was updated successfully, but these errors were encountered: