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.