A clear definition of snap type

We have field in the snapcraft.yaml (Type) that defaults to app.

  • What is the purpose of defining this?
  • What is it currently used for (if at all)?
  • What use does it serve either the publisher or end users?
  • Is there, or can somebody help me with, a clear definition for each of the following options:
  1. App,
  2. Core
  3. Gadget
  4. Kernel

The type is needed by snapd (and partitially also by the store) to know how to deal with a snap.

  • Core -> Is specific to the core snap, not something a snap developer touches at all. On classic installs (desktops/servers) it is the execution environment all your snaps are run under. In UbuntuCore installs (embedded, IoT etc) it is actually the systems root filesystem.

  • Gadget -> A snap that defines how an UbuntuCore image looks like, it defines partitioning of the image, bootloader, the bootloader configuration, interfaces to access the hardware of the embedded device, pre-connected interfaces of snaps and default configurations for snaps shipped in an UbuntuCore install.
    Documentation is at: Gadget snaps

  • Kernel -> Well … a kernel to use in an UbuntuCore image, packaged as a snap …

  • App -> Any kind of app. I.e. a desktop or server app, a bundle of apps working together shipped as one package etc.

As a normal user/developer you will most likely only deal with the latter … if you want to build some tailored image for an embedded or IoT device you will likely also touch gadget snaps (and perhaps also kernel snaps if it is a board not supported by any existing kernel snaps in the store)

That’s great, thanks very much.