#shuttle-service #axum

shuttle-axum

Service implementation to run an axum webserver on shuttle

27 breaking releases

new 0.39.0 Feb 14, 2024
0.37.0 Jan 24, 2024
0.35.2 Dec 21, 2023
0.34.1 Nov 29, 2023
0.13.0 Mar 27, 2023

#291 in HTTP server

Download history 876/week @ 2023-10-27 835/week @ 2023-11-03 742/week @ 2023-11-10 1108/week @ 2023-11-17 1594/week @ 2023-11-24 1488/week @ 2023-12-01 1277/week @ 2023-12-08 1503/week @ 2023-12-15 2080/week @ 2023-12-22 1148/week @ 2023-12-29 2073/week @ 2024-01-05 1282/week @ 2024-01-12 1150/week @ 2024-01-19 1204/week @ 2024-01-26 940/week @ 2024-02-02 1158/week @ 2024-02-09

4,654 downloads per month
Used in 2 crates

Apache-2.0

4KB

Shuttle service integration for the Axum web framework

Axum 0.7 is used by default.

Axum 0.6 is supported by using these feature flags:

axum = "0.6.0"
shuttle-axum = { version = "0.39.0", default-features = false, features = ["axum-0-6"] }

Example

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

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

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

    Ok(router.into())
}

Dependencies

~23–37MB
~646K SLoC