Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Worked example

This chapter builds a small Linux app for all five formats on a Linux host. By the end, dist/ contains one artifact per format.

This chapter uses the installed CLI from Getting started.

Project layout

After you add Breadbox and write the config, your project looks like this:

my-app/
├── assets/
│   └── myapp.svg
├── src/
│   └── main.rs
├── breadbox.toml
├── Cargo.toml
├── LICENSE
└── README.md

Cargo.toml

[package]
name = "myapp"
version = "0.1.0"
edition = "2024"
description = "Example desktop application"
license = "MIT"
authors = ["Example Dev <dev@example.com>"]
repository = "https://example.com/myapp"

All three package formats need a convertible package name and pkg needs a convertible version. The description and first author are needed for deb. pkg also needs a license and rpm needs a description and license. Because the package has one binary, you do not need package.default-run.

breadbox.toml

Install Breadbox as shown in Getting started, then run init from the project root. Keep the generated version line and add the settings below:

breadbox-version = "0.0.1-alpha.1"
app-name = "My App"

[linux]
identifier = "com.example.myapp"
description-long = "Example desktop application with a small settings window"
categories = "Utility"

[components.license]
license-file = "LICENSE"

[linux.icons]
scalable = "assets/myapp.svg"

[install.linux.files.readme]
source = "README.md"
destination = "/usr/share/doc/myapp/README.md"
role = "doc"
mode = "0644"
formats = ["deb", "rpm", "pkg"]

[formats.deb]
extra-depends = ["ca-certificates"]

[formats.rpm]
extra-requires = ["ca-certificates"]

[formats.pkg]
extra-depends = ["ca-certificates"]

The icon is needed by appimage. With the default desktop file, it also gives deb, pkg and rpm a non-empty Icon= value. The license is placed where each format expects it and the README is installed only for the three package formats. Use --force-config if you need to overwrite an existing config.

Check, inspect and build

Formats must be selected explicitly:

breadbox doctor --format raw,deb,pkg,rpm,appimage
breadbox info
breadbox build --format raw,deb,pkg,rpm,appimage --dry-run
breadbox build --format raw,deb,pkg,rpm,appimage

doctor checks the tools listed in the format overview. --dry-run resolves and validates the project, prints the summary and exits. The final build compiles the binary and writes an artifact for each format that succeeds.

Resulting dist/

On an x86_64 Linux host, names look like this:

dist/
├── myapp_0.1.0_x86_64
├── myapp_0.1.0_x86_64.AppImage
├── myapp_0.1.0_amd64.deb
├── myapp-0.1.0-1-x86_64.pkg.tar.zst
└── myapp-0.1.0-1.<dist>.x86_64.rpm

rpmbuild chooses the RPM filename, so the .<dist>. part depends on the build host and can be empty. Exact naming rules are in the format guides.

Next steps