Resulting Snaps should be significantly smaller

Nov 28, 2016 23:45 GMT  ·  By

Canonical's Olivier Tilloy announced today, November 28, 2016, that with the recent availability of the ubuntu-app-platform snap in the Ubuntu Snappy Store, application developers can now package their apps as Snaps without the need to build all the deps.

This is possible now because the latest Ubuntu-app-platform snap build incorporates the standard Qt 5 libraries, the QML (Qt Meta Language) runtime, the Ubuntu UI (User Interface) toolkit, and their dependencies. The Oxide web engine library based on Chromium and related QML bindings is also bundled in the ubuntu-app-platform snap, so the new Snaps should now be significantly smaller.

"This allows app developers to declare a dependency on this snap through the content sharing mechanism, thus reducing dramatically the size of the resulting app snaps," explains the developer. "I went through the exercise with the webbrowser-app snap. This proved surprisingly easy and the size of the snap (amd64 architecture) went down from 136MB to 22MB, a sizeable saving!"

Snapcraft will soon be updated to support the new changes

At the moment of writing this article, the Snapcraft Snap creator utility does not support the changes made to the ubuntu-app-platform snap, so it will still crawl for dependencies when attempting to package your apps as Snaps. An updated Snapcraft version will soon be made available for supported Ubuntu platforms. Also, if your app depends on a specific Qt module, you'll need to add it to the build.

For those interested in more details, we recommend checking out the actual changes made to the snapcraft.yaml file, as well as the temporary workaround that lets you use Snapcraft with the latest ubuntu-app-platform snap. All these changes lay the groundwork for the next step in the massive adoption of Snaps as the universal package format for Linux-based operating systems.