runtime Debian-based Docker image.
Build architecture
Shuttle builds and runs images for the Arm64 (aarch64) architecture by default. Pro+ users can reach out to Shuttle Support if they require the x86_64 architecture.Builder image
The Rust builder image is based on cargo-chef to utilize Docker-layer caching of the build dependencies.Rust toolchain
The Rust version in the image is regularly updated to the lateststable-aarch64-unknown-linux-gnu toolchain (or stable-x86_64-unknown-linux-gnu depending on your projectβs build architecture).
By default, the wasm32-unknown-unknown target is installed, which enables compiling WASM frontends.
External tools
Apart from what is already found in the Debian-based cargo-chef image [1] [2], theseapt packages are also installed:
clangcmakellvm-devlibclang-devmoldprotobuf-compiler
cargo-binstall(latest)trunk(0.19.2)
Some other build tool you think we should add? Let us know!
Customize build process
Feature flags
Use the βshuttleβ feature flag for custom behavior when building on Shuttle.Environment variables
TheSHUTTLE=true env var is set in the builder image.
If you have build flags or env variables that need to be set during compilation, you can add them in .cargo/config.toml (docs) and include it in your deployment. Below are some examples.
.cargo/config.toml
Runtime image
The runtime image that your built executable is placed in is abookworm-slim (Debian 12) with ca-certificates and curl installed.
(EXPERIMENTAL) Hook scripts
This feature is experimental and can change
shuttle_prebuild.sh: Runs beforecargo build. Can be used to install custom build dependencies.shuttle_postbuild.sh: Runs aftercargo build.shuttle_setup_container.sh: Runs in the runtime image before build artifacts are copied into it. Can be used to install custom runtime dependencies.
Example: Install a custom Rust toolchain
In this example, we install and switch to thenightly toolchain.
shuttle_prebuild.sh
Example: Install a build dependency
shuttle_prebuild.sh
Example: Build a WASM frontend
shuttle_postbuild.sh
Example: Install a runtime dependency
shuttle_setup_container.sh

