Skip to content

v0.8.0

Compare
Choose a tag to compare
@oddgrd oddgrd released this 16 Dec 09:29
· 948 commits to main since this release
2956292

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!)

https://github.com/shuttle-hq/shuttle/raw/main/assets/v0.8.0-interactive-init.gif

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 = "[email protected]: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

Pull Requests for this release

Full Changelog: v0.7.2...v0.8.0