# GRA Manifest Reference
This document explain the contents of the App.toml content from `gtk-rust-app`. It contains a full list of possible sections and fields. Every fields purpose is statet as well as which generated files contain the value and a link to the underlying specification (given there is some).
# Table of Contents
1. [Section [app]](#app)
- [categories](#categories)
- [content-rating](#content-rating)
- [description](#description)
- [flatpak-modules](#flatpak-modules)
- [flatpak-runtime-version](#flatpak-runtime-version)
- [generic-name](#generic-name)
- [id](#id)
- [metadata-license](#metadata-license)
- [mimetype](#mimetype)
- [permissions](#permissions)
- [requires](#requires)
- [recommends](#recommends)
- [releases](#releases)
- [screenshots](#screenshots)
- [summary](#summary)
2. [Section [settings]](#section-settings)
3. [Section [actions]](#section-actions)
## Section [app]
The app section contains all metadata of your app.
| Field | Description | Type | Links |
| --- | --- | --- | --- |
| `categories` | A list of categories your app belongs to.
Example:
`categories = ["GTK", "Development"]` | `Vec` | [Freedesktop Menu spec](https://specifications.freedesktop.org/menu-spec/menu-spec-1.0.html#category-registry)
Used in:
`*.appdata.xml`
`*.desktop` |
| `content-rating` | A list of objects to specify age rating for your app.
Example:
`content-rating = [{ id = "language-humor", value = "mild" }]` | `Vec<{id:String, value:String}>` | [AppStream spec](https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-content_rating)
Used in:
`*.appdata.xml` |
| `description` | A long description of your app. May contain some basic HTML tags (see spec).
Example:
`description = "Lorem ipsum...
"` | `String`
(Basic HTML) | [AppStream spec](https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-description)
Used in:
`*.appdata.xml` |
| `flatpak-modules` | A list of flatpak module definitions in yaml.
Example:
`flatpak-modules = [""" see cargo-gra/examples/complete """]` | `Vec` | [Flatpak manifest reference](https://docs.flatpak.org/en/latest/manifests.html#modules)
Used in
`*.flatpak.yml` |
| `flatpak-runtime-version` | The version of the flatpak Gnome runtime to use.
Example:
`flatpak-runtime-version = "42"` | `String` | [Flatpak manifest reference](https://docs.flatpak.org/en/latest/manifests.html#basic-properties
Used in
`*.flatpak.yml` |
| `generic-name` | The generic name of your app. E.g. your clock app is called `clocky` but the displayed name in a distro is still `Clock`
Example:
`generic-name = "Clock"` | `String` | [Desktop file spec](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys)
Used in
`*.desktop` |
| `id` | The unique identifier of your app.
Example:
`id = "org.example.TestApp"` | `String` | [AppStream spec](https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic)
Used in:
`*.flatpak.yml`
`*.desktop`
`*.appdata.xml` |
| `metadata-license` | The license of the metadata xml file used to describe your app.
This may be a helpful link: https://techbase.kde.org/MetaInfo/DesktopApps#.3Cmetadata_license.2F.3E
Example:
`metadata-license = "CC0-1.0"` | `String` | [AppStream spec](https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-metadata_license)
Used in:
`*.appdata.xml` |
| `mimetype` | The license of the metadata xml file used to describe your app.
This may be a helpful link: https://developer-old.gnome.org/integration-guide/stable/mime.html.en
Example:
`mimetype = "image/png;image/jpeg"` | `String` | [Desktop file spec](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys)
Used in:
`*.desktop` |
| `permissions` | A list of permissions your app will need. The values are the finish args for the flatpak build. The resulting flatpak container will request these permissions.
Example:
`permissions = ["share=network", "socket=wayland"]` | `Vec` | [Flatpak spec](https://docs.flatpak.org/en/latest/sandbox-permissions.html#sandbox-permissions)
Used for:
`*.flatpak.yml` |
| `requires` | A list of screen and usage requirements. Important to notify users about the adaptiveness and inteded input method.
Example:
`requires = [ { display = ">360" }, { display = "<=1024" } ]` | `Vec` | [Freedesktop Menu spec](https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations)
Used in:
`*.appdata.xml` |
| `recommends` | A list of screen and usage recommendations. Important to notify users about the adaptiveness and inteded input method.
Example:
`recommends = [{ control = "pointer"}, { control = "keyboard"}, {control = "touch"}]` | `Vec` | [Freedesktop Menu spec](https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-relations)
Used in:
`*.appdata.xml` |
| `releases` | The release history of your app. This will be shown in store pages. Note: It may be useful to use conventional-commits and generate the CHANGELOG and release history based on your commit messages. Checkout [this project](https://gitlab.com/floers/karlender) to see how it can be done.
Example:
`releases = [{ version = "0.0.2", date = "2021-12-04", description = "The first version."}]`| `Vec<{ version:String, date:String, description:String}>`| [AppStream spec](https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-releases)
Used in:
`*.appdata.xml` |
| `screenshots` | A list of screenshots. These screenshots will be displayed in the store page.
Example:
`screenshots = [{ type = "default", url = "https://..." }, { url = "https://..." }]` |`Vec<{type:String, url:String}>`| [AppStream spec](https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-screenshots)
Used in:
`*.appdata.xml` |
| `summary` | A short description of your app. Will be shown in store pages and in distros search results.
Example:
`summary = "Time management made easy"` | `String` | [Specification](https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-summary)
[Desktop file spec](https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys)
Used in:
`*.appdata.xml`
`*.desktop (Comment)` |
## Section [settings]
Your app will most likely have some global, persisted settings. E.g. the window size and state may be persisted after your app is closed. These settings can be specified here as custom key-value pairs. Values may be numbers or strings but no objects.
### Example
```toml
[settings]
# The setting will be called `window-height` and have the initial value `600`
window-height = 600
```
The cargo-gra build will generate a gsettings schema here: `target/gra-gen/*.gschema.xml`. They can be installed globally during development via:
```
sudo cp target/gra-gen/*.gschema.xml /usr/share/glib-2.0/schemas/
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/
```
Also they will be installed in the flatpak container in a flatpak build via `cargo gra flatpak`