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

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

RequirementNotes
Rust 1.88 or newerInstall with rustup. Cargo comes with Rust.
Installed Breadbox CLIInstall it with Cargo in the next step. It must be on your PATH.
One buildable binaryIf your package has several buildable binaries, set package.default-run in your Cargo.toml. See breadbox info.
No extra tools for rawcargo 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.