40 breaking releases

0.52.0 Feb 4, 2025
0.50.0 Jan 7, 2025
0.49.0 Nov 12, 2024
0.47.0 Jul 23, 2024
0.13.0 Mar 27, 2023

#110 in Web programming

Download history 4017/week @ 2024-10-26 3848/week @ 2024-11-02 2907/week @ 2024-11-09 3680/week @ 2024-11-16 4228/week @ 2024-11-23 5125/week @ 2024-11-30 5712/week @ 2024-12-07 5997/week @ 2024-12-14 3801/week @ 2024-12-21 3099/week @ 2024-12-28 5220/week @ 2025-01-04 6654/week @ 2025-01-11 5658/week @ 2025-01-18 4355/week @ 2025-01-25 5523/week @ 2025-02-01 6471/week @ 2025-02-08

23,137 downloads per month
Used in 26 crates

Apache-2.0

135KB
3K 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.52.0"
shuttle-runtime = "0.52.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–25MB
~355K SLoC