Skip to main content

Rocket 0.5.1

Release Date: May 22, 2024

I spent the afternoon upgrading a Rust API server to Rocket 0.5.1, and honestly? It was smoother than I expected. TL;DR: the new form types are 🔥 but watch those deadpool dependency bumps.

Whats in Rocket 0.5.1

Rocket 0.5.1 dropped on May 22, 2024, and it is the first point release since the landmark 0.5.0 that brought stable Rust support and async/await to Rocket. This release is all about polish — fixing edge cases, updating dependencies, and adding quality-of-life improvements without breaking the core.

Here is what actually changed across the crate family:

  • rocket (0.5.1): The big news is that `char` and `std::ops::Range` types now implement `FromForm`. If you have been hand-parsing query strings for range filters, that is done now. Also, `[T; N]`, `Vec`, and `[u8]` work in the `uri!` macro. No more wrangling slices into URIs.
  • rocket_db_pools (0.2.0): SQLite extensions are now supported via `sqlx_sqlite` — just add an `extensions` config key. BUT this bumps `deadpool` to 0.13, which is a breaking change if you are using the pool config struct directly.
  • rocket_dyn_templates (0.2.0): Minijinja 2.0 support via `.j2` file extensions. Handlebars got bumped to 5.1 — another breaking if you are deep in template internals.
  • rocket_ws (0.1.1): New `WebSocket::accept_key()` method and a `tungstenite` 0.21 update. Nothing earth-shattering, but the API is getting there.

The Breaking Bits

If you are on Rocket 0.4.x, stop reading and check the full 0.5 migration guide — async rewrite is a big leap. But if you are already on 0.5.0, the upgrade to 0.5.1 is near-zero friction provided you update your `Cargo.toml` pins:

  • rocket_db_pools Config struct grew an `extensions` field
  • handlebars bumped from 4.x to 5.1
  • `deadpool` bumped from 0.10/0.11 to 0.13
  • MSRV is now Rust 1.64 (already met by anyone running 0.5.0)

Worth It?

Yes. Rocket 0.5.1 is a solid maintenance release that fixes real issues (TempFile not flushing before persist? Yikes) and adds genuinely useful form and template ergonomics. The breaking changes are limited to database-pool and template-crate users, so most apps just recompile and move on.

Upgrade command: `cargo update`. Read the full changelog on the Rocket GitHub repo.

What is New?

By continuing to use the site, you agree to the use of cookies.