Cargo.toml at the project root (or root directory you set). Service type: Web service (or Worker if you choose that).
Recommended setup
Leave Install and Build empty. Brimble’s builder (Railpack) detects Rust and runs the right steps for you.
What the builder does when install/build are empty:
- Installs the Rust toolchain.
- Compiles with
cargo build --release(for workspaces:cargo build --release --package <pkg>). - Copies the binary from Cargo’s output into
bin/(or your Output directory if set). - Starts with
./bin/<app-name>(or./<output-directory>/<app-name>if you set one).
<app-name> is the package name from Cargo.toml (e.g. ringroad → ./bin/ringroad).
Output directory
Cargo still builds into
target/release/ first. Output directory is where Brimble places the runnable binary in the final image — not a replacement for Cargo’s build cache path.
Why not target/release?
cargo build --release writes the binary to target/release/<app-name>. That is Cargo’s normal output directory.
The running image does not keep target/. Build caches use it; the final container does not ship it. So a start command like:
No such file or directory even when the build succeeded.
The binary that is in the image lives at:
Custom build command
If you need a custom Build (flags, features, workspace package), either:- Set Output directory (e.g.
bin) and a Start like./bin/<app-name>— Brimble copiestarget/release/<app-name>into that directory for you, or - Copy yourself in the build command:
./bin/<app-name> (or match your output directory).
A bare cargo build --release with no output directory and no cp leaves no runnable path in the image. The build can succeed and the container still cannot start.
Install command
Optional. You can setcargo fetch if you want; it is not required when Build is empty.
Listen on all interfaces
Your process must listen on0.0.0.0 and the PORT env var Brimble injects (or the port you configure). Binding only to 127.0.0.1 will fail health checks. See Application failed to respond.
Checklist
- Prefer empty Build unless you have a reason to override.
- Start is
./bin/<app-name>, not./target/release/.... - If Build is custom, it ends with a copy into
bin/. - App binds to
0.0.0.0and$PORT.