Breadbox Manual
Breadbox packages Rust desktop applications from a Cargo project. It builds the binary with Cargo,
then writes one or more artifacts to dist/.
This manual covers Breadbox 0.0.1-alpha.1. Breadbox 0.0.x is alpha software. The CLI and config
format can change between releases. --format is required for build and doctor.
Start here
- Getting started sets up a config and builds a first artifact.
- CLI reference covers commands and options.
- Configuration reference covers
breadbox.tomlkeys and interpolation. - Format guides explain host tools, project requirements and output names.
License
This manual uses the same MIT license as Breadbox.
Getting started
This chapter adds Breadbox to an existing Rust project. You will create a config and build a first
raw artifact. By the end you have breadbox.toml and a file in dist/.
Breadbox 0.0.x is alpha software. The CLI and config format can change between releases.
Requirements
| Requirement | Notes |
|---|---|
| Rust 1.88 or newer | Install with rustup. Cargo comes with Rust. |
| Installed Breadbox CLI | Install it with Cargo in the next step. It must be on your PATH. |
| One buildable binary | If your package has several buildable binaries, set package.default-run in your Cargo.toml. See breadbox info. |
No extra tools for raw | cargo is enough for the first artifact. Other formats need host tools. |
Install Breadbox
cargo install breadbox --version 0.0.1-alpha.1 --locked
Check that the command is available:
breadbox --version
If your shell cannot find breadbox, add Cargo's bin directory to your PATH. Shell completions are
optional. See breadbox completions.
Create the config
Run init from your project root:
breadbox init
init creates breadbox.toml when none exists and records the installed CLI version. Existing files
are left alone and reported as skipped. Use --force-config to replace an existing file. Keep the
generated version line when you edit the config. See Root keys.
Build a raw artifact
--format is required for build and doctor. Run these commands from the project root:
breadbox info
breadbox doctor --format raw
breadbox build --format raw --dry-run
breadbox build --format raw
info prints resolved app data and paths. doctor checks host tools for the selected formats.
build --dry-run resolves and validates the project, prints the summary and exits without building.
The final command compiles the app with the release profile and writes the artifact.
Check the result
On an x86_64 Unix host, you should see a file like this:
dist/
└── myapp_0.1.0_x86_64
The exact name follows your package name, version and architecture. On Windows, the artifact ends in
.exe. At this point your setup works:
my-app/
├── breadbox.toml
├── dist/
│ └── myapp_0.1.0_x86_64
├── Cargo.toml
└── src/
└── main.rs
If breadbox is not found, check that cargo install finished and that Cargo's bin directory is on
your PATH. If doctor says cargo is missing, check the PATH in the shell where you run Breadbox.
Next steps
Linux packages need more settings in breadbox.toml and Cargo.toml. Start with the
worked example, Root keys and
Linux settings.
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
- Add install files for data your app needs at runtime.
- Add extra dependencies when shared-library detection misses something.
- Use interpolation to avoid repeating the version or package name.
CLI reference
breadbox [OPTIONS] <COMMAND>
breadbox help [COMMAND]
| Command | Description |
|---|---|
build | Build the app for selected formats. |
doctor | Check host tools for selected formats. |
info | Print resolved project metadata and paths. |
init | Create breadbox.toml. |
completions | Generate shell completion scripts. |
Use -h/--help for command help, -V/--version for the version and help [COMMAND] for help
with a specific command.
Global options work with every command. See Global options.
Exit behavior
Runtime errors print error: <message> and exit with status 1. Usage errors exit with status 2.
If you interrupt a build with Ctrl+C, Breadbox prints an interrupted summary and exits with status
130.
Global options
These options work before or after the command:
breadbox --project-root .. build
breadbox build --project-root ..
| Option | Default | Description |
|---|---|---|
-p, --project-root <PATH> | Current directory | Your project root. |
--manifest-path <PATH> | Cargo.toml in the project root | Your Cargo.toml. |
--config <PATH> | breadbox.toml in the project root if it exists | Breadbox config. When absent, defaults are used. |
Path resolution
| Path | Resolution |
|---|---|
| Project root | --project-root or the current directory. Resolved to a full path. |
| Cargo manifest | --manifest-path or Cargo.toml in the project root. Relative paths use the project root. Resolved to a full path. |
| Config | --config or breadbox.toml in the project root if that file exists. Relative paths use the project root. Resolved to a full path. |
An explicit --config path must exist. If you pass no config option and breadbox.toml is absent,
breadbox uses built-in defaults.
breadbox build
breadbox build [OPTIONS]
Builds the app for the selected formats and writes artifacts to --out-dir, which defaults to
<project-root>/dist.
Options
| Option | Default | Description |
|---|---|---|
-f, --format <FORMAT>... | Required | Formats to build. Repeatable or comma-separated. |
--out-dir <PATH> | <project-root>/dist | Output directory. |
--profile <NAME> | release | Cargo profile used for the application binary. |
--no-locked | Off | Build without --locked. |
--tests <MODE> | From config, otherwise off | Override the test gate: off, warn or block. |
--keep-temp | Off | Keep the temporary build directory. |
--dry-run | Off | Print the resolved summary without building. |
Global options work with this command. See Global options.
Format selection
At least one format is required. -f and --format accept comma-separated values, several values
after one flag or repeated flags. Repeated names are used once. Unsupported formats are an error.
breadbox build --format raw,deb
breadbox build -f raw -f rpm
Breadbox supports raw, deb, pkg, rpm and appimage. See Format guides.
Tests
By default, build does not run tests. Add [tests] to breadbox.toml to run cargo test before the
binary build. off skips tests, warn continues after a test failure and block stops the build.
--tests overrides the configured mode. See Root keys.
Summary
Before a build, Breadbox prints the resolved summary:
My App build config
formats raw deb
root /home/me/projects/my-app
out-dir /home/me/projects/my-app/dist
version 0.1.0
profile release
locked yes
tests off
keep-temp no
--dry-run resolves and validates the project, prints this summary and exits. It does not check
format-specific tools, run Cargo or build packages.
Failures
Breadbox exits with 0 on success, 1 after a runtime error and 130 if you interrupt a running
build. Usage errors exit with 2. Omitting --format exits with status 1.
If one format fails, Breadbox continues with the rest. It lists each failed format as
<format>: <error> with the underlying cause at the end. Missing host dependencies tell you to run
breadbox doctor --format <formats> with the same selected formats.
Temporary files are removed after a clean build. They are kept after a format failure or after any
build when you pass --keep-temp.
breadbox doctor
breadbox doctor [OPTIONS]
Checks whether cargo and the host tools for the selected formats are available. --format is
required and works the same way as it does for build.
breadbox doctor --format raw
breadbox doctor --format deb,rpm
breadbox doctor -f appimage
What is checked
doctor checks cargo and the tools listed in the format overview. It loads
the selected [formats] config, so options such as [formats.deb] shlibdeps can change the tool
list. It does not validate your Cargo.toml or other config sections.
Output
breadbox dependency check
ok cargo
ok dpkg-shlibdeps
ok dpkg-deb
missing rpmbuild (Install rpmbuild (usually provided by rpm-build/rpm-tools))
error: missing host dependencies
Exit codes
doctor exits with 0 when all required tools are present and 1 when any are missing. Usage
errors exit with 2.
breadbox info
breadbox info [--profile <NAME>] [OPTIONS]
Prints the resolved project metadata and paths. --profile defaults to release and only affects
the binary path it shows. It does not build anything.
breadbox info
breadbox info --profile dev
Fields
| Field | Meaning |
|---|---|
app | app-name from config or the package name. |
package | Package name from your Cargo.toml. |
version | Package version. |
bin | Selected binary target name. |
source | Path to the binary's source file. |
run | package.default-run or <none>. |
features | Enabled default features or <none>. |
requires | Binary required-features or <none>. |
arch | Detected architecture: x86, x86_64, arm or aarch64. |
profile | Value of --profile. |
formats | Formats supported by this host, sorted. |
root | Absolute project root. |
manifest | Absolute path to your Cargo.toml. |
config | Absolute config path or <none>. |
workspace | Cargo workspace root. |
out | Output directory. |
target | Cargo target directory. |
exe | Resolved binary path for the chosen profile. |
The output starts with the header breadbox project info. Empty optional values and empty lists
appear as <none>.
Binary selection
Breadbox reads your Cargo.toml and picks a buildable binary. Candidate binaries are bin targets
whose required-features are covered by the enabled default features.
- One candidate is selected automatically.
- If there are no candidates, breadbox reports
no buildable binary target found in Cargo.toml. - Several candidates require
package.default-runin yourCargo.toml. - A
package.default-runvalue that does not name a buildable binary is an error.
breadbox init
breadbox init [OPTIONS]
Creates breadbox.toml in the project root when none exists. The new file records the installed CLI
version:
breadbox-version = "0.0.1-alpha.1"
| Option | Description |
|---|---|
--force-config | Replace an existing config file. |
Without --force-config, an existing file is left alone and reported as skipped. Add the settings
your formats need before building. See Root keys and the
worked example.
breadbox completions
breadbox completions <SHELL> [OPTIONS]
Prints a completion script to stdout or writes it to a user location with --install.
| Shell | Value | --install |
|---|---|---|
| Bash | bash | Unix |
| Zsh | zsh | Unix |
| Fish | fish | Unix |
| PowerShell | powershell | Windows |
| Elvish | elvish | Use --path |
| Option | Description |
|---|---|
--install | Write the script instead of printing it. |
--path <PATH> | Use a custom location. Requires --install. |
--force | Overwrite an existing script. Requires --install. |
--dry-run | Show the target and action without writing. Requires --install. |
Install locations
| Shell | Standard location |
|---|---|
| Bash | $XDG_DATA_HOME/bash-completion/completions/breadbox, otherwise ~/.local/share/bash-completion/completions/breadbox |
| Zsh | $XDG_DATA_HOME/zsh/site-functions/_breadbox, otherwise ~/.local/share/zsh/site-functions/_breadbox |
| Fish | $XDG_CONFIG_HOME/fish/completions/breadbox.fish, otherwise ~/.config/fish/completions/breadbox.fish |
| Windows PowerShell | %USERPROFILE%\Documents\PowerShell\completions\breadbox.ps1 |
breadbox completions bash --install
breadbox completions zsh --install --path ~/.zfunc/_breadbox
--install does not edit shell startup files. Breadbox prints any extra setup you need.
- Bash: enable
bash-completion, then restart Bash or source your completion setup. - Zsh: add the printed
fpathline to~/.zshrcbeforecompinit. - Fish: Fish loads this file automatically.
- PowerShell on Windows: add the printed dot-source line to your
$PROFILE.
Use breadbox completions <SHELL> without --install to print the script, including for Elvish.
Re-run the install command after upgrading Breadbox.
Configuration reference
Breadbox configuration is optional. If <project-root>/breadbox.toml does not exist and you do not
pass --config, Breadbox uses defaults. init creates a config that pins breadbox-version to the
installed CLI.
The file is TOML. Use the keys shown in the reference. Unsupported keys are errors.
[linux.desktop] accepts your own entry keys and [linux.desktop.actions] adds desktop actions.
[linux.icons] uses size keys that you choose.
Strings can contain ${namespace:key} tokens. See Interpolation.
Which keys you need depends on the formats you select. A raw-only build needs no extra config.
Linux package formats need shared fields in [linux] and, for some formats, fields in Cargo.toml.
Path rules
Absolute paths are used as written. Relative paths are joined to the absolute project root, even when
the config file is elsewhere. Install destinations are absolute virtual paths inside the package.
Breadbox removes the leading / when it places files.
Chapters
- Root keys: top-level fields and test settings.
- Components: license files and browser registration.
- Linux settings: shared fields, icons, desktop entries and actions.
- Install files: extra files placed in packages.
- Format sections:
[formats.<name>]options. - Interpolation:
${config:},${manifest:}and${build:}tokens.
Root keys
Most root keys in breadbox.toml are optional. Linux package formats (deb, pkg, rpm and
appimage) need identifier, description-long and categories in the [linux] table. See
Linux settings.
| Key | Type | Default | Required | Description |
|---|---|---|---|---|
breadbox-version | string | None | No | CLI version recorded by init. |
app-name | string | Package name | No | Application name in the desktop file, summaries and info output. |
components | table | Empty | No | Optional components. See Components. |
linux | table | Empty | For Linux package formats | Shared fields, icons, desktop entries and actions. See Linux settings. |
install | table | Empty | No | Extra files. See Install files. |
formats | table | Empty | No | Per-format options. See Format sections. |
tests | table | None | No | Cargo test gate. See Tests. |
breadbox-version
init records the installed CLI version. An older recorded version prints a warning. A newer one
stops with an error. Versions are three-part semantic versions. A final release sorts after its
prereleases, so a config written by breadbox 0.0.1-alpha.1 prints a compatibility warning with
breadbox 0.0.1. Build metadata after + is ignored. A missing or blank value prints a compatibility
warning. Malformed versions stop with an error. Keep the generated line unless you intend to change
that behavior.
app-name
app-name overrides the package name from Cargo.toml in user-facing output. A blank value counts as
unset.
Linux fields
The shared Linux fields live in [linux]:
[linux]
identifier = "com.example.myapp"
description-long = "Example desktop application with a small settings window"
categories = "Utility;Development;"
identifierbecomes the.desktopfilename and icon basename. Use one safe filename component: ASCII letters, digits,.,_or-, not.or...description-longis used bydebandrpm.categoriesis the defaultCategories=value in generated desktop files.
Tests
By default, build does not run tests. Add [tests] to run cargo test before the binary build:
[tests]
mode = "warn"
| Mode | Behavior |
|---|---|
off | Do not run tests. |
warn | Run tests and continue after a failure. |
block | Run tests and stop the build on failure. |
With no [tests] table, the mode is off. With [tests] but no mode, the mode is warn. Use
breadbox build --tests <MODE> to override the config for one build.
Minimal example
app-name = "Example App"
[linux]
identifier = "com.example.myapp"
description-long = "Example desktop application"
categories = "Utility"
This is enough for deb, pkg and rpm, as long as your Cargo.toml contains the fields those
formats need. appimage also needs at least one icon and a non-empty Icon= value in the final
desktop entry.
Components
Components are optional extras configured in breadbox.toml.
License component
[components.license] adds a license file to Linux packages.
| Key | Type | Default | Description |
|---|---|---|---|
license-file | string | None | Path to a license file. Setting it enables the component. |
[components.license]
license-file = "LICENSE"
When you select a Linux package format, the path must be non-blank and name an existing file. Relative paths use the project root. Absolute paths are used as written. Breadbox places the license at:
| Format | Destination |
|---|---|
rpm | usr/share/licenses/<package-name>/<filename> |
appimage | <filename> at the AppDir root |
deb | usr/share/doc/<deb-package-name>/copyright |
pkg | usr/share/licenses/<pkg-package-name>/<filename> |
raw builds do not include the license component.
Browser registration component
[components.browser-registration] registers the app as an HTTP/HTTPS handler in the generated
desktop entry.
| Key | Type | Default | Description |
|---|---|---|---|
enabled | bool | false | Registers the app as an HTTP/HTTPS handler in the desktop entry. |
[components.browser-registration]
enabled = true
When enabled, Breadbox adds these desktop values:
| Entry | Value |
|---|---|
Exec | <binary-name> %u |
MimeType | ["x-scheme-handler/http", "x-scheme-handler/https"] |
Component entries are applied first. A string under [linux.desktop] replaces a component value.
An array appends to it and removes duplicates. Keep %u when you replace Exec. Include the
HTTP/HTTPS scheme handlers yourself when you replace MimeType with a string. See
Linux settings.
Linux settings
The [linux] table holds the shared fields and files used by Linux package formats. Breadbox checks
them when you select deb, pkg, rpm or appimage.
Shared fields
| Key | Description |
|---|---|
identifier | Safe filename component used for the desktop file and icon names. |
description-long | Long description used by deb and rpm. |
categories | Default desktop Categories value. |
See Root keys.
[linux.icons]
Keys are icon sizes and values are file paths.
| Key | Value |
|---|---|
scalable | Path to an .svg file. |
WxH | Path to a .png or .xpm file, with numeric width and height. |
Each path must name an existing file. Relative paths use the project root. Absolute paths are used as
written. Icons are installed under usr/share/icons/hicolor/<size>/apps/<identifier>.<ext>.
[linux.icons]
scalable = "icons/app.svg"
64x64 = "icons/app-64.png"
128x128 = "icons/app-128.png"
Breadbox adds Icon=<identifier> when you configure at least one icon. appimage needs at least one
icon and a non-empty Icon value in the final desktop entry. If no scalable icon is set, Breadbox
uses the largest configured icon.
[linux.desktop]
Write desktop entry keys directly under [linux.desktop]. Strings replace generated or component
values. Arrays append to generated or component lists and remove duplicates. Use a string to replace
a list completely. For the full set of keys and value rules, see the
Desktop Entry Specification.
[linux.desktop]
StartupWMClass = "myapp"
Comment = "Example desktop application"
Categories = ["Utility", "Development"]
MimeType = ["x-scheme-handler/http", "x-scheme-handler/https"]
Icon = "myapp"
template is not supported. Using it is an error. Write keys directly under [linux.desktop], or
add a desktop file with install files.
Keys accept ASCII letters, digits and -. Locale suffixes accept ASCII letters, digits, _, -,
@ and ., as in "Name[fr]" = "Nom". Write arrays as semicolon-terminated lists. Escape ;,
\, newline, carriage return and tab. Empty arrays and empty list items are errors.
A final desktop entry needs Type = "Application", Name and Exec. Exec can be omitted only
when the entry sets DBusActivatable to the string "true". Other Type values are errors.
Breadbox writes these defaults when you do not override them:
| Key | Value |
|---|---|
Name | app-name or the package name. |
Exec | Binary name. |
Type | Application. |
Categories | linux.categories. |
Comment | Package description. |
StartupWMClass | Binary name. |
Icon | linux.identifier, when icons are configured. |
Component entries are applied first. See Browser registration.
Desktop actions
List action IDs in Actions and configure each ID under [linux.desktop.actions.<id>]:
[linux.desktop]
Actions = ["open", "settings"]
[linux.desktop.actions.open]
Name = "Open"
Exec = "myapp --open"
[linux.desktop.actions.settings]
Name = "Settings"
Exec = "myapp --settings"
Actions also accepts a semicolon-terminated string such as "open;settings;", but arrays are
recommended. Action IDs accept ASCII letters, digits and -. Each ID needs a matching action table.
Unlisted tables are errors. Each action needs Name and Exec. Exec can be omitted when the main
entry sets DBusActivatable = "true". Action tables accept the same key, value, locale and escaping
rules as the main entry.
Install files
Add extra files under [install.linux.files.<id>], where <id> is any identifier you choose.
| Key | Type | Default | Description |
|---|---|---|---|
source | string | Required | File or directory to copy. Relative paths use the project root. |
destination | string | Required | Absolute virtual package path. Cannot contain ... |
recursive | bool | false | Copy a directory recursively. Directory sources are always recursive. |
role | enum | data | data, license, copyright, doc or config. |
mode | string | None | Octal mode with an optional 0o prefix, up to 0o7777. Files only. |
formats | array of strings | All applicable | Restrict the file to the listed formats. |
Breadbox removes the leading / from destination when it places the file in the package:
destination = "/usr/share/myapp/data.txt" -> usr/share/myapp/data.txt
Roles
| Role | Effect |
|---|---|
data | Ordinary installed file. |
license | %license in rpm. Ordinary file elsewhere. |
copyright | %license in rpm. Ordinary file elsewhere. |
doc | %doc in rpm. Ordinary file elsewhere. |
config | DEBIAN/conffiles for deb, %config(noreplace) for rpm, backup=() for pkg. |
In rpm, data files installed below /usr/share/licenses/ are also written as %license.
Examples
[install.linux.files.manual]
source = "docs/manual.pdf"
destination = "/usr/share/doc/myapp/manual.pdf"
role = "doc"
mode = "0644"
formats = ["deb", "rpm"]
[install.linux.files.resources]
source = "assets/resources"
destination = "/usr/share/myapp/resources"
recursive = true
When you omit formats, Breadbox includes the file in every selected format that supports Linux
install files. When you set it, only the listed formats receive the file.
Extra desktop files
Breadbox generates one main desktop entry at
/usr/share/applications/<linux.identifier>.desktop for Linux package formats. Use install files to
add other .desktop files:
[install.linux.files.settings_desktop]
source = "assets/myapp-settings.desktop"
destination = "/usr/share/applications/myapp-settings.desktop"
Install files are staged after the generated entry, so an install file with the same destination
replaces it. Breadbox does not validate desktop files supplied this way. For AppImage builds,
Breadbox passes that path to linuxdeploy. If you replace the generated entry, keep its Icon value
aligned with [linux.desktop].
Format sections
Per-format options live under [formats.<name>]. Use only the options documented in the individual
format guide. Empty sections are valid.
| Format | Guide |
|---|---|
raw | No options. |
deb | Debian options. |
pkg | Arch package options. |
rpm | RPM options. |
appimage | No options. |
[formats.raw]
[formats.appimage]
See the format guides for host tools, project requirements and artifact names.
Interpolation
String values in breadbox.toml can contain ${namespace:key} tokens. Arrays and tables are
searched too. Tokens are expanded before Breadbox applies the config, so you can avoid repeating
values from Cargo or from the config itself.
| Namespace | Source |
|---|---|
config | A dotted path into the original config. |
manifest | Fields from your Cargo.toml and selected binary. |
build | Resolved project and build paths. |
${config:...}
Use a dotted path into the config. Referenced values must be strings or scalar values that can be written as text.
[linux]
categories = "Utility;Development;"
description-long = "${config:linux.categories} application"
${manifest:...}
| Field | Description |
|---|---|
package-name | Package name. |
version | Package version. |
description | Package description. Error if unset. |
repository | Repository URL. Error if unset. |
license | SPDX license. Error if unset. |
authors | All authors, joined with ", ". |
binary-name | Selected binary target name. |
binary-source | Selected binary source path. |
binary-required-features | Binary required-features, joined with ", ". |
default-run | package.default-run. Error if unset. |
default-features | Enabled default features, joined with ", ". |
workspace-root | Cargo workspace root. |
target-directory | Cargo target directory. |
List fields accept a .N suffix for one element, for example ${manifest:authors.0}.
app-name = "${manifest:package-name} (${manifest:version})"
[linux]
identifier = "com.example.${manifest:package-name}"
description-long = "${manifest:description}"
${build:...}
| Field | Description |
|---|---|
arch | x86, x86_64, arm or aarch64. |
profile | Cargo profile supplied to build or info. |
project-root | Absolute project root. |
out-dir | Resolved output directory. |
binary-path | Resolved application binary path. |
[install.linux.files.icon]
source = "${build:project-root}/assets/${manifest:package-name}.svg"
destination = "/usr/share/icons/hicolor/scalable/apps/${manifest:package-name}.svg"
Format guides
Breadbox supports raw, deb, pkg, rpm and appimage. raw works on any host. The other four
require Linux.
| Format | Host | Host tools | Config section |
|---|---|---|---|
raw | Any | cargo | None |
deb | Linux | dpkg-shlibdeps, dpkg-deb | [formats.deb] |
pkg | Linux | makepkg, fakeroot | [formats.pkg] |
rpm | Linux | rpmbuild | [formats.rpm] |
appimage | Linux | wget, sha256sum | None |
Package names vary by distribution. Install the equivalent packages if a hint does not apply.
Select formats
--format is required for build and doctor. It accepts comma-separated values, several values
after one flag or repeated flags.
breadbox build --format raw
breadbox build -f deb,rpm
breadbox doctor -f appimage
Requesting a format your host does not support is an error.
Host tool hints
| Format | Install hint |
|---|---|
raw | Install Rust with rustup. |
deb | Usually dpkg-dev and dpkg on dpkg-based systems. |
pkg | Usually base-devel on Arch-based systems. |
rpm | Usually rpm-build or rpm-tools. |
appimage | Usually wget and coreutils. |
dpkg-shlibdeps is not needed when [formats.deb] shlibdeps = false. See
Format sections.
Architecture mapping
| Breadbox | raw | deb | pkg | rpm | appimage |
|---|---|---|---|---|---|
x86 | x86 | i386 | i686 | i686 | i386 |
x86_64 | x86_64 | amd64 | x86_64 | x86_64 | x86_64 |
arm | arm | armhf | armv7h | armv7hl | armhf |
aarch64 | aarch64 | arm64 | aarch64 | aarch64 | aarch64 |
Shared config
Linux package formats share the settings in Root keys, Linux settings, Install files and Components. Each guide below covers only what is unique to that format.
Output files
Artifact names are deterministic. A build silently replaces an existing file with the same name in
--out-dir. Move or rename earlier artifacts if you need to keep them.
raw
raw copies your built binary into the output directory. It works on any host and has no options.
breadbox build --format raw
Requirements
- One buildable binary or
package.default-runin yourCargo.toml. - No format-specific config. A generated
breadbox.tomlonly pinsbreadbox-version.
Output
The artifact is named:
<package-name>_<version>_<arch>
On Windows, the name gains a .exe suffix. On Unix, Breadbox sets the copied file permissions to
0755.
myapp_0.1.0_x86_64
myapp_0.1.0_aarch64.exe
raw does not add desktop files, icons, components or install files. See
breadbox build for --out-dir.
deb
deb builds a Debian package. It is available only on Linux and needs dpkg-deb. By default it also
uses dpkg-shlibdeps to find dependencies. See the format overview for tools and
architecture names.
Cargo.toml requirements
| Field | Requirement |
|---|---|
package.name | Converts to a Debian package name. Use letters, digits, ., + and -. _ becomes -. The first character is a letter or digit. The name needs at least two characters. |
package.description | Required and single-line. |
package.authors[0] | Required. Used as maintainer. |
package.repository | Optional single-line homepage. |
Config
Set the shared Linux fields in [linux] as shown in
Linux settings, then add options under [formats.deb].
| Option | Default | Description |
|---|---|---|
extra-depends | [] | Extra Depends: clauses. Entries are added after the results from dpkg-shlibdeps. Keep entries on one line. |
shlibdeps | true | Run dpkg-shlibdeps. Set false to supply all dependencies yourself. This also removes the tool from breadbox doctor. |
[linux]
identifier = "com.example.myapp"
description-long = "Example desktop application"
categories = "Utility"
[formats.deb]
extra-depends = ["ca-certificates", "libc6 (>= 2.34)"]
Install files with role = "config" are listed in DEBIAN/conffiles. See
Install files.
Output
Breadbox converts - in the Cargo version to ~ for Debian. The artifact is named:
<deb-package-name>_<debian-version>_<deb-arch>.deb
pkg
pkg builds an Arch Linux package with makepkg and needs fakeroot. It is available only on Linux.
Breadbox runs makepkg --skipinteg --nodeps. It skips integrity checks for the generated PKGBUILD
and does not resolve dependencies. Declare runtime dependencies with extra-depends. See the
format overview for tools and architecture names.
Cargo.toml requirements
| Field | Requirement |
|---|---|
package.name | Converts to an Arch package name. Use letters, digits, @, ., + and -. _ becomes -. The first character is a letter or digit. |
package.version | Use ASCII letters, digits, ., _, - and +. - and + become _. The first character is a letter or digit. |
package.description | Required and single-line. |
package.license | Required and single-line. |
package.authors[0] | Required and single-line. |
package.repository | Optional and single-line. |
Config
Set the shared Linux fields in [linux] as shown in
Linux settings, then add options under [formats.pkg].
| Option | Default | Description |
|---|---|---|
extra-depends | [] | Extra package dependencies. Keep entries on one line and use only ASCII letters, digits and @ . _ + - < = > :. |
[linux]
identifier = "com.example.myapp"
description-long = "Example desktop application"
categories = "Utility"
[formats.pkg]
extra-depends = ["glibc", "bash"]
Install files with role = "config" are added to the package backup list. See
Install files.
Output
<name>-<version>-1-<pkg-arch>.pkg.tar.zst
rpm
rpm builds an RPM package with rpmbuild. It is available only on Linux. See the
format overview for tools and architecture names.
Cargo.toml requirements
| Field | Requirement |
|---|---|
package.name | ASCII letters are lowercased. _ becomes -. Use letters, digits, ., + and -. The first character is a letter or digit. |
package.description | Required and single-line. Used as Summary:. |
package.license | Required and single-line. |
package.authors[0] | Optional. Used as Vendor:. |
package.repository | Optional. Used as URL:. |
Config
Set the shared Linux fields in [linux] as shown in
Linux settings, then add options under [formats.rpm].
| Option | Default | Description |
|---|---|---|
extra-requires | [] | Extra Requires: lines. Keep entries on one line. |
[linux]
identifier = "com.example.myapp"
description-long = "Example desktop application"
categories = "Utility"
[formats.rpm]
extra-requires = ["bash", "ca-certificates"]
Install-file roles control the generated file list. See Install files.
Version and output
The Cargo version becomes the RPM version. A suffix after the first - becomes the release:
0.1.0-beta.1 produces version 0.1.0 and release 0.beta.1. Without a suffix, the release is 1.
rpmbuild chooses the exact filename, including any .<dist>. part:
myapp-0.1.0-1.<dist>.x86_64.rpm
appimage
appimage builds an AppImage for Linux. It requires at least one icon and uses wget and
sha256sum to fetch a pinned linuxdeploy helper. Breadbox verifies the helper's SHA-256 digest and
caches it in the platform cache directory. The first build needs network access unless the helper is
cached. See the format overview for tools and architecture names.
Cargo.toml requirements
- One buildable binary or
package.default-runin yourCargo.toml.
Config
Set the shared Linux fields and at least one icon. [formats.appimage] has no options.
[linux]
identifier = "com.example.myapp"
description-long = "Example desktop application"
categories = "Utility"
[linux.icons]
scalable = "icons/myapp.svg"
64x64 = "icons/myapp-64.png"
The final desktop entry must have a non-empty Icon value. With the default desktop file, adding an
icon is enough. If you set Icon yourself, put it under [linux.desktop]. See
Linux settings.
Install files and the configured license are included in the AppImage. See Install files and Components.
Output
<package-name>_<version>_<appimage-arch>.AppImage