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"