We're excited to release shuttle v0.8.0! 🚀
Here are the highlights in this update.
Better scaffolding
The CLI now has a completely interactive starter flow (thanks @Procrat and @guerinoni!)
Static files
You can now send a local folder from your source files to deployed services.
Just add the shuttle-static-folder
crate to your Cargo.toml
:
[dependencies]
shuttle-service = { version = "0.8.0" }
shuttle-static-folder = { version = "0.8.0" }
and add the #[shuttle_static_folder::StaticFolder]
annotation to a PathBuf
argument in your service's main:
use shuttle_static_folder::StaticFolder;
#[shuttle_service::main]
async fn main(
#[StaticFolder(folder = "/public")] static: PathBuf,
) -> _ { ... }
This will mount a folder in the service's runtime and populate it with the content of the local directory /public
. If you don't specify the value of the folder
parameter, the default is /static
. Head over [to the docs](https://docs.shuttle.rs/resources/shuttle-static-folder) to learn more about this plugin.
Public dependencies
The Cargo.toml
file of your shuttle services can now accept any public dependency that can be pulled on deployment - not just [crates.io](http://crates.io/) ones. This means, for example, that you can deploy with git dependencies:
[dependencies]
shuttle-service = { version = "0.8.0" }
strum = { git = "git@github.com:shuttle-hq/strum.git" }
And more!
- We now support Actix Web, thanks @biryukovmaxim!
- We have bumped our supported Rust version to 1.65, and our pinned tokio version to 1.22
- We have bumped all of our dependencies, including our integrations. A few of you will need to upgrade as well, for example Axum users will have to upgrade to
0.6
to use the latest version of shuttle-service with the axum integration. - We fixed issues for certain projects that would lead them to not report their readiness state correctly
- We've added a redeployment strategy that kicks in if projects stop responding, making them more resilient to unexpected panics
How to upgrade
If you had a project on shuttle, then you will need to manually update the version to 0.8.0
in your Cargo.toml
. You may also need to update the versions of your shuttle resources to 0.8.0
.
To upgrade your project container:
cargo shuttle project rm // to remove your project
cargo shuttle project new // to recreate your project
cargo shuttle deploy // redeploy your service
To upgrade your shuttle CLI, simply run cargo install cargo-shuttle
.
New Contributors
- @Procrat made their first contribution in #498
- @Nereuxofficial made their first contribution in #477
- @biryukovmaxim made their first contribution in #491
- @guerinoni made their first contribution in #502
Pull Requests for this release
- feat: link the tracing spans between services by @chesedo in #445
- Add docker-compose extra flags param in Makefile by @brokad in #446
- misc: restructure repo by @chesedo in #453
- refactor: tf files are now in shuttle-hq/terraform-aws-shuttle by @brokad in #449
- fix: wrap around common::ProjectName for parsing by @brokad in #451
- fix: gateway state drifts, health checks and project recreation by @brokad in #447
- misc: add more helpful flags to Makefile by @brokad in #456
- misc: remove old migrator by @chesedo in #463
- feat(gateway): add account_tier column by @brokad in #458
- feat: prefetch shuttle-service crates by @chesedo in #461
- Feat: revive via gateway endpoint by @oddgrd in #460
- feat: create a new admin cli binary crate by @chesedo in #462
- fix: broken link by @oddgrd in #467
- fix: add timeout to health checks by @brokad in #468
- feat(gateway): add custom domains table and routing by @akrantz01 in #465
- WIP feat: count recent start events before restart by @oddgrd in #469
- feat: make deployer only answer its own project by @chesedo in #466
- Fixed Links in Readme by @Nereuxofficial in #477
- refactor: base client error off response status code by @chesedo in #470
- feat: verify project exists before sending destroy task by @oddgrd in #474
- feat: add a custom domains admin route by @chesedo in #473
- bug: deployer freezes by @chesedo in #478
- ci: green by @chesedo in #482
- feat: TLS acceptor with SNI resolver by @brokad in #471
- fix: custom domain routing by @brokad in #484
- refactor: more metrics by @chesedo in #475
- misc: configurable deployment tags by @brokad in #486
- feat: restore removed containers by @brokad in #485
- fix: backend bumps and hot fixes by @brokad in #487
- Feature/support actix web by @biryukovmaxim in #491
- Doc: Fix command to prime database with docker-compose by @guerinoni in #502
- Doc: Improve contributing documentation by @guerinoni in #499
- feat: static file support for a single folder by @chesedo in #501
- ci: build binary by @chesedo in #483
- feat: bump rust to 1.64, bump dependencies by @oddgrd in #495
- feat: interactive project initialization by @Procrat in #498
- feat: bump pinned rust version to 1.65 by @oddgrd in #504
- misc: env updates by @chesedo in #509
- feat: make the folder configurable by @chesedo in #508
- feat: implement workspace inheritance by @oddgrd in #506
- refactor: switch away from cargo package by @chesedo in #507
- Add spinner wait for
project new
andproject status --follow
by @guerinoni in #503 - fix: capitalise correctly by @brokad in #511
- fix: make nice by @brokad in #512
- feat: find (soon to be) invalid project names by @chesedo in #479
- refactor: missed axum 0.6 update by @chesedo in #513
- feat: build tests in release profile, limit build workers by @oddgrd in #514
- feat: create
init
project from correct dir by @oddgrd in #518 - misc: interactive init gif by @brokad in #519
- Feat/set examples submodule to main by @oddgrd in #520
- chore: 0.8.0 by @oddgrd in #521
- chore: bump examples by @brokad in #522
- bug: hacking static folders by @chesedo in #524
- fix: actix integration with state by @oddgrd in #523
- chore: release v0.8.0 by @brokad in #528
Full Changelog: v0.7.2...v0.8.0