email@example.com Recently the ubuntu-app-platform snap has been made available in the store…" /> firstname.lastname@example.org Recently the ubuntu-app-platform snap has been made available in the store…" />
This is a guest post by Olivier Tilloy, Software Engineer at Canonical. If you would like to contribute a guest post, please contact email@example.com
Recently the ubuntu-app-platform snap has been made available in the store for application developers to build their snaps without bundling all their dependencies. The ubuntu-app-platform snap includes standard Qt libraries (version 5.6.1 as of this writing) and QML runtime, the ubuntu UI toolkit and related dependencies, and oxide (a web engine based on the chromium content API and its QML bindings).
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.
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!
For those interested in the details, here are the actual changes in the snapcraft.yaml file: see here.
Essentially they consist in:
Note that the resulting snap could be made even smaller. There is a known bug in snapcraft where it uses ldd to crawl the dependencies, ignoring the fact that those dependencies are already present in the ubuntu-app-platform snap.
Also note that if your app depends on any Qt module that isn’t bundled with ubuntu-app-platform, you will need to add it to the stage packages of your snap, and this is likely to bring in all the Qt dependencies, thus duplicating them. The easy fix for this situation is to override snapcraft’s default behaviour by specifying which files the part should install, using the “snap” section (see what was done for e.g. address-book-app at here.
From home control to drones, robots and industrial systems, Ubuntu Core and Snaps provide robust security, app stores and reliable updates for all your IoT devices.
Software developers often have enough to worry about. Their focus is creating the best application they can, often without having to consider packaging. We recently discovered Akira, which illustrates this well. The small team of…
Canonical has released MicroK8s – a fast and efficient upstream Kubernetes delivered as a single snap package that installs on 42 flavours of Linux. With a small disk and memory footprint, MicroK8s provides an efficient way to deploy…
Used by the likes of Netflix, Tesla and Apple, GitKraken is the go-to home for developers who are looking for a more user-friendly interface for Git with integrations for GitHub, GitLab, Bitbucket and VSTS (Azure DevOps). Established a…