/shuttle

Deploy Rust apps with a single Cargo command

Primary LanguageRustApache License 2.0Apache-2.0


docs language build status discord


shuttle

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

Shuttle is built for productivity, reliability and performance:

  • Zero-Configuration support for Rust using annotations
  • Automatic resource provisioning (databases, caches, subdomains, etc.) via Infrastructure-From-Code
  • First-class support for popular Rust frameworks (Rocket, Axum, Tide, Poem and Tower)
  • Support for deploying Discord bots using Serenity
  • Scalable hosting (with optional self-hosting)

Getting Started

First download the Shuttle cargo extension and login:

$ cargo install cargo-shuttle
$ cargo shuttle login

Create your first shuttle app with the axum framework:

$ cargo shuttle init --axum hello-world

Your Cargo.toml should look like:

[package]
name = "hello-world"
version = "0.1.0"
edition = "2021"

[lib]

[dependencies]
axum = "0.5"
shuttle-service = { version = "0.5.2", features = ["web-axum"] }
sync_wrapper = "0.1"

Your shuttle app in lib.rs should look like:

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

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

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

    Ok(sync_wrapper)
}

Deploy:

$ cargo shuttle deploy
   Finished dev [unoptimized + debuginfo] target(s) in 1m 01s

        Project:            hello-world
        Deployment Id:      3d08ac34-ad63-41c1-836b-99afdc90af9f
        Deployment Status:  DEPLOYED
        Host:               hello-world.shuttleapp.rs
        Created At:         2022-04-01 08:32:34.412602556 UTC
        Database URI:       postgres://***:***@pg.shuttle.rs/db-hello-world

For the full documentation, visit docs.rs/shuttle-service

Contributing to shuttle

If you want to setup a local environment to test code changes to core shuttle packages, or want to contribute to the project see CONTRIBUTING.md

Roadmap

For a comprehensive view of the shuttle roadmap check out this project board.

If you have any requests or suggestions feel free to open an issue.

Community & Support

  • Community Forum. Best for: help with building, discussion about best practices.
  • GitHub Issues. Best for: bugs and errors you encounter using Shuttle.
  • Discord. Best for: sharing your applications and hanging out with the community.
  • Twitter. Best for: keeping up with announcements and releases

Status

  • Alpha: We are testing Shuttle, API and deployments may be unstable
  • Public Alpha: Anyone can sign up, but go easy on us, there are a few kinks
  • Public Beta: Stable enough for most non-enterprise use-cases
  • Public: Production-ready!

We are currently in Public Alpha. Watch "releases" of this repo to get notified of major updates!

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Ben

πŸ“ πŸ› πŸ’» ⚠️

Casey Bailey

πŸ› πŸ“–

Christos Hadjiaslanis

πŸ“ πŸ’» πŸ‘€ ⚠️ πŸ“Ή πŸ›

Damien

πŸ› πŸ’» πŸ“– πŸ” πŸ‘€ ⚠️

David Laban

πŸ› πŸ’» ⚠️

Ivan

πŸ“ πŸ› πŸ’» ⚠️

Lilian Anatolie Moraru

πŸ–‹

Luis CossΓ­o

πŸ’» ⚠️

Mario Idival

πŸ’» ⚠️

Matthew Aylward

πŸ’» ⚠️

Max

πŸ› πŸ’» πŸ’‘ πŸ‘€ ⚠️

Nahua

πŸ› πŸ’» ⚠️

Nodar Daneliya

πŸ’Ό πŸ”

OddbjΓΈrn GrΓΈdem

πŸ’» ⚠️

Pieter

πŸ› πŸ’» πŸ’‘ πŸ§‘β€πŸ« πŸ‘€ ⚠️ πŸ“–

Tsotne Nazarashvili

πŸ–‹

Xavientois

πŸ› πŸ’» ⚠️

jmwill86

πŸ› πŸ“– ⚠️ πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!