This page answers:

  • What container is my app running in?
  • What tools and programs are installed?
  • How do I set environment variables?

Deployer and Rust version

Deployments are currently built and run in our shuttle-deployer container, which is based on a Rust Bookworm docker image (Debian 12).

The current Rust version is 1.75.0, toolchain stable-x86_64-unknown-linux-gnu. It’s not currently possible for you to change this, but being able to choose which toolchain your project will be compiled with is a planned feature.

The target wasm32-unknown-unknown is installed, which enables compiling WASM frontends.

External tools

Apart from what is already found in the Debian image [1] [2], these apt packages are also installed:

  • llvm-dev
  • libclang-dev
  • clang
  • cmake
  • lld
  • mold

Additionally, these tools are installed:

  • cargo-binstall (latest)
  • trunk 0.18.8
  • protoc 22.2

Installing more dependencies is not officially supported, but can be done with a bit of tinkering.

Environment variables

There are some environment variables set in the Shuttle container. Check for SHUTTLE=true for custom behavior when running on Shuttle.

SHUTTLE=true
RUST_VERSION="1.75.0"
RUSTUP_TOOLCHAIN="1.75.0"

Build environment

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
[build]
rustflags = ["--more", "cheese"]

[env]
MY_ENV_VAR = "Shuttle to the moon! 🚀🚀🚀"

[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/ld.lld"]

Runtime environment

See Shuttle Secrets

Limitations

Most of the limits below are due to change as we roll out paid tiers. Read more about Pricing here.

Currently we limit a project container’s memory usage to 4 GB during high contention and 6 GB otherwise.

CPU usage per project is currently limited to 4 threads. However, because of how this limit is implemented through Docker, popular crates like num_cpus may think it has access to all of the host’s threads.

In terms of database resources, the only restriction we have is that an RDS database has a max storage of 20GB.

Other than that any reasonable usage is acceptable during our beta, but we will intervene when we detect applications that use excessively large amounts of storage (after attempting to contact the owner).