Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shuttle-hq/shuttle
Build & ship backends without writing any infrastructure files.
https://github.com/shuttle-hq/shuttle
baas deployment devops framework paas rust web web-framework
Last synced: 5 days ago
JSON representation
Build & ship backends without writing any infrastructure files.
- Host: GitHub
- URL: https://github.com/shuttle-hq/shuttle
- Owner: shuttle-hq
- License: apache-2.0
- Created: 2022-02-19T18:37:55.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-08-07T06:27:49.000Z (5 months ago)
- Last Synced: 2024-08-10T10:01:48.758Z (5 months ago)
- Topics: baas, deployment, devops, framework, paas, rust, web, web-framework
- Language: Rust
- Homepage: https://shuttle.rs
- Size: 67.9 MB
- Stars: 5,865
- Watchers: 23
- Forks: 246
- Open Issues: 107
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome - shuttle-hq/shuttle - Build & ship backends without writing any infrastructure files. (Rust)
- awesome-rust - shuttle
- awesome-rust-cn - shuttle
- awesome-rust - shuttle - A serverless platform. (Applications)
- fucking-awesome-rust - shuttle - A serverless platform. (Applications)
- fucking-awesome-rust - shuttle - A serverless platform. (Applications)
README
Fastest Way to Build & Ship Rust Apps
Get resources and deploy your apps with a few lines of code.Simple. Easy. Joyful.
Report Bug
·
Request a Feature
·
Join Our Discord
·
Follow us on Twitter
*
⭐ If you find Shuttle interesting, consider starring this repo to help spread the word.*
# Features
* __One-line Resource Provisioning:__ Get a database, or any other AWS resource by adding a line of code to your main file. To delete one, just remove that line of code. No config/yaml files required.
* __Rapid Development:__ It takes 2 minutes from project initialization to a deployed project. It takes another 2 minutes to provision a resource, and get it deployed to production.
* __First-class support for popular Rust frameworks:__ [Axum](https://docs.shuttle.dev/examples/axum), [Actix Web](https://docs.shuttle.dev/examples/actix), [Rocket](https://docs.shuttle.dev/examples/rocket), and [more](https://docs.shuttle.dev/examples/other)
* __Security:__ Let us worry about the security & permissions while you focus on writing good code.
# Quick Start
On Linux and macOS, you can use this install script, which will automatically install the correct target for your OS and distro:
```sh
curl -sSfL https://www.shuttle.dev/install | bash
```On Windows, you can use this install script to do the same:
```powershell
iwr "https://www.shuttle.dev/install-win" | iex
```After installing, log in with:
```sh
shuttle login
```To initialize your project, simply write:
```bash
shuttle init --template axum hello-world
```And to deploy it, write:
```bash
cd hello-world
shuttle deploy
```And... that's it!
```text
Service Name: hello-world
Deployment ID: 3d08ac34-ad63-41c1-836b-99afdc90af9f
Status: running
Last Updated: 2022-04-01T08:32:34Z
URI: https://hello-world.shuttleapp.rs
```Feel free to build on top of the generated `hello-world` boilerplate or take a stab at one of our [examples](https://github.com/shuttle-hq/shuttle-examples).
For the full documentation, visit [our docs](https://docs.shuttle.dev).
# Quick Look
Below is a basic "Hello World" application written in Axum:
```rust
use axum::{routing::get, Router};#[tokio::main]
async fn main() {
let app = Router::new().route("/", get(hello_world));let listener = tokio::net::TcpListener::bind("127.0.0.1:3000")
.await
.unwrap();
println!("listening on {}", listener.local_addr().unwrap());
axum::serve(listener, app).await.unwrap();
}async fn hello_world() -> &'static str {
"Hello, world!"
}
```In order to be able to deploy it with a single command, we update the snippet as follows:
```rust
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())
}
```Now, with just `shuttle deploy`, you can see your application live. But let's enhance it further by adding a shared Postgres database:
```rust
use axum::{routing::get, Router};async fn hello_world() -> &'static str {
"Hello, world!"
}#[shuttle_runtime::main]
async fn main(
#[shuttle_shared_db::Postgres] pool: sqlx::PgPool,
) -> shuttle_axum::ShuttleAxum {pool.execute(include_str!("../schema.sql"))
.await
.expect("failed to run migrations");let router = Router::new().route("/", get(hello_world));
Ok(router.into())
}
```Now, if we run `shuttle deploy`, we'll have an up and running project with a database inside & ready to use.
# Repositories
| Name | Description |
|-|-|
| [shuttle](https://github.com/shuttle-hq/shuttle) 🚀 (This repo) | The core Shuttle product. Contains all crates that users interact with. |
| [shuttle-examples](https://github.com/shuttle-hq/shuttle-examples) 👨🏫 | Officially maintained examples of projects that can be deployed on Shuttle. Also has a list of [community examples](https://github.com/shuttle-hq/shuttle-examples#community-examples). |
| [shuttle-docs](https://github.com/shuttle-hq/shuttle-docs) 📃 | Documentation hosted on [docs.shuttle.dev](https://docs.shuttle.dev/). |
| [www](https://github.com/shuttle-hq/www) 🌍 | Our website [shuttle.dev](https://www.shuttle.dev/), including the [blog](https://www.shuttle.dev/blog/tags/all) and [Launchpad newsletter](https://www.shuttle.dev/launchpad). |
| [deploy-action](https://github.com/shuttle-hq/deploy-action) ⚙ | GitHub Action for continuous deployments. |
| [awesome-shuttle](https://github.com/shuttle-hq/awesome-shuttle) 🌟 | An awesome list of Shuttle-hosted projects and resources that users can add to. |
| [shuttlings](https://github.com/shuttle-hq/shuttlings) ⚔️ | A collection of Rust code challenges. A great way to get started with using Rust and Shuttle. |
# Contributing to Shuttle
Contributing to Shuttle is highly encouraged!
Even if you are not planning to submit any code, joining our [Discord server](https://discord.gg/shuttle) and providing feedback helps us a lot!Check out our [contributing docs](./CONTRIBUTING.md) and find the appropriate repo above to contribute to.
For development of this repo, check the [development docs](./DEVELOPING.md).### Algora Bounties 💰
To offload work from the engineering team on low-priority issues, we will sometimes add a cash bounty to issues.
Sign up to the [Algora Console](https://console.algora.io/org/shuttle/bounties?status=open) to find open issues with bounties.# Project Status
We are currently in Public Beta.
Watch "releases" of this repo to get notified of major updates!- [x] Alpha: We are testing Shuttle, API and deployments may be unstable
- [x] Public Alpha: Anyone can sign up, but go easy on us,
there are a few kinks
- [x] Public Beta: Stable enough for most non-enterprise use-cases
- [ ] Public: Production-ready!
# Contributors ✨
Thanks goes to these wonderful people:
Made with [contrib.rocks](https://contrib.rocks).