#dev #run-time #deployment #web-framework

shuttle-runtime

Runtime to run a service on the Shuttle platform (https://www.shuttle.dev)

42 breaking releases

new 0.54.0 May 7, 2025
0.53.0 Mar 12, 2025
0.52.0 Feb 4, 2025
0.49.0 Nov 12, 2024
0.13.0 Mar 27, 2023

#660 in HTTP server

Download history 5714/week @ 2025-01-17 4746/week @ 2025-01-24 5120/week @ 2025-01-31 5292/week @ 2025-02-07 5037/week @ 2025-02-14 5006/week @ 2025-02-21 4704/week @ 2025-02-28 5328/week @ 2025-03-07 7037/week @ 2025-03-14 5632/week @ 2025-03-21 4754/week @ 2025-03-28 4147/week @ 2025-04-04 5166/week @ 2025-04-11 4354/week @ 2025-04-18 6884/week @ 2025-04-25 4734/week @ 2025-05-02

21,921 downloads per month
Used in 26 crates

Apache-2.0

155KB
3.5K SLoC

Shuttle - Deploy Rust apps with a single command

Shuttle is a Rust-native cloud development platform that lets you deploy your Rust apps for free.

📖 Check out our documentation to get started quickly: docs.shuttle.dev

🙋‍♂️ If you have any questions, join our Discord server.

Usage

Start by installing the Shuttle CLI by running the following in a terminal:

cargo install cargo-shuttle

Now that Shuttle is installed, you can initialize a project with Axum boilerplate:

shuttle init --template axum my-axum-app

By looking at the Cargo.toml file of the generated my-axum-app project you will see it has been made to be a binary crate with a few dependencies including shuttle-runtime and shuttle-axum.

axum = "0.7.3"
shuttle-axum = "0.54.0"
shuttle-runtime = "0.54.0"
tokio = "1.28.2"

A boilerplate code for your axum project can also be found in src/main.rs:

use axum::{routing::get, Router};

async fn hello_world() -> &'static str {
    "Hello, world!"
}

#[shuttle_runtime::main]
async fn main() -> shuttle_axum::ShuttleAxum {
    let router = Router::new().route("/", get(hello_world));

    Ok(router.into())
}

Check out our docs to see all the frameworks we support, or our examples if you prefer that format.

Running locally

To test your app locally before deploying, use:

shuttle run

You should see your app build and start on the default port 8000. You can test this using;

curl http://localhost:8000/
# Hello, world!

Deploying

Deploy the service with:

shuttle deploy

Your service will then be made available under a subdomain of *.shuttle.app. For example:

curl https://my-axum-app-0000.shuttle.app/
# Hello, world!

Dependencies

~12–26MB
~365K SLoC