Shuttle - Deploy Rust apps with a single Cargo subcommand
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.rs
🙋♂️ If you have any questions, join our Discord server.
Usage
Start by installing the cargo shuttle
subcommand by running the following in a terminal:
Now that Shuttle is installed, you can initialize a project with Axum boilerplate:
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
.
= "0.7.3"
= "0.44.0"
= "0.44.0"
= "1.28.2"
A boilerplate code for your axum project can also be found in src/main.rs
:
use ;
async
async
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:
You should see your app build and start on the default port 8000. You can test this using;
# Hello, world!
Deploying
Before you can deploy, you have to create a project. This will start a deployer container for your
project under the hood, ensuring isolation from other users' projects. PS. you don't have to do this
now if you did in in the cargo shuttle init
flow.
Then, deploy the service with:
Your service will immediately be available at https://{project_name}.shuttleapp.rs/
. For example:
# Hello, world!