Rust Buildpack on App Platform
Validated on 2 Feb 2026 • Last edited on 6 Feb 2026
App Platform is a fully managed Platform-as-a-Service (PaaS) that deploys applications from Git repositories or container images. It automatically builds, deploys, and scales components while handling all underlying infrastructure.
How App Platform Builds Images
App Platform supports two ways to build an image for your app: Cloud Native Buildpacks and Dockerfiles.
When you give App Platform access to your code, it defaults to using a Dockerfile if one is present in the root of the directory or specified in the app spec. Otherwise, App Platform checks your code to determine what language or framework it uses. If it supports the language or framework, it chooses an appropriate resource type and uses the proper buildpack to build the app and deploy a container.
App Platform uses the Paketo Community’s Rust buildpack to detect and build Rust-based apps.
Rust Buildpack Overview
The Paketo Community Rust buildpack is a meta buildpack that bundles the Rust-related CNBs in the correct order. It includes:
Individual Buildpacks
paketo-community/rustup
The Rustup buildpack installs and runs rustup to provision the Rust toolchain when another buildpack requires rust and BP_RUSTUP_ENABLED=true (default).
Detection and Behavior
- Participates when another buildpack requires
rustand rustup is enabled. - Installs
rustup-init, then installs the Rust toolchain. - Honors
rust-toolchainorrust-toolchain.tomlwhen present. - Adds a Rust target via
rustup target addwhenBP_RUST_TARGETis set.
Configuration
BP_RUSTUP_ENABLED(defaulttrue): Enable rustup installation.BP_RUST_TOOLCHAIN(defaultstable): Toolchain to install (stable,beta,nightly, or a version).BP_RUST_PROFILE(defaultminimum): Profile to install (minimum,default,complete).BP_RUST_TARGET: Additional Rust target to install.BP_RUSTUP_INIT_VERSION: Version ofrustup-init(default latest1.*).BP_RUSTUP_INIT_LIBC(defaultgnu): libc implementation (gnuormusl).
paketo-community/rust-dist
The Rust Dist buildpack installs a Rust toolchain from a packaged distribution. It always passes detection and participates when rust is required by another buildpack.
Detection and Behavior
- Always passes detection.
- Contributes Rust to a build or cache layer and adds the toolchain to
$PATHwhen requested.
Configuration
BP_RUST_VERSION: Rust version to install. The buildpack supports Rust major version 1, including any 1.x.x versions.
Bindings
- Optional
dependency-mappingbinding to map dependency digests to custom URIs.
paketo-community/cargo
The Cargo buildpack builds Rust applications using Cargo and expects Rust and Cargo to be available from rustup or rust-dist.
Detection and Behavior
- Participates when both
Cargo.tomlandCargo.lockexist in the app root. - Requests Rust and Cargo.
- Caches build artifacts by linking
target/to a cache layer. - Builds workspace members with
cargo installand registers process types for binary targets. - Removes source files from
/workspaceand leaves only built binaries. - Installs and uses
tiniby default for PID1 signal handling.
Configuration
BP_CARGO_INSTALL_ARGS(default--locked): Additional args forcargo install(buildpack controls--path,--root, and--color).BP_CARGO_WORKSPACE_MEMBERS: Comma-separated workspace package names to build.BP_CARGO_INSTALL_TOOLS: Space-separated list of tools to install withcargo installduring build.BP_CARGO_INSTALL_TOOLS_ARGS: Args applied when installing tools.BP_CARGO_TINI_DISABLED(defaultfalse): Disable installing/usingtini.BP_STATIC_BINARY_TYPE: Static binary type for tiny/static stacks (muslcorgnulibc).BP_INCLUDE_FILES: Colon-separated include globs for source files to keep.BP_EXCLUDE_FILES: Colon-separated exclude globs for source files to remove.BP_DISABLE_SBOM(defaultfalse): Disable the SBOM scan.
Build Behavior
If BP_RUST_VERSION is not set, the buildpack installs and uses the latest Rust 1.x version.
By default, the Rust buildpack registers process types for all binary projects in your workspace. If you add a Procfile, the buildpack uses its web process as the startup command.
Tini Process Manager
The buildpack installs tini by default to handle PID1 responsibilities and signal forwarding. If you need to disable it, set the environment variable BP_CARGO_TINI_DISABLED=true at build time.