Skip to content

Update Rust crate rocket to 0.5.0-rc.2

Administrator requested to merge renovate/rocket-0.x into main

Created by: renovate[bot]

Mend Renovate

This PR contains the following updates:

Package Type Update New value References Sourcegraph
rocket (source) dependencies patch 0.5.0-rc.2 homepage, source code search for "rocket"

Test plan: CI should pass with updated dependencies. No review required: this is an automated dependency update PR.

Test plan: CI should pass with updated dependencies.


Release Notes

SergioBenitez/Rocket

v0.5.0-rc.2

Compare Source

Major Features and Improvements

  • Introduced [rocket_db_pools] for asynchronous database pooling.
  • Introduced support for [mutual TLS] and client [Certificate]s.
  • Added a [local_cache_once!] macro for request-local storage.
  • Added a v0.4 to v0.5 migration guide and FAQ to Rocket's website.
  • Introduced shutdown fairings.

Breaking Changes

  • Hash impls for MediaType and ContentType no longer consider media type parameters.
  • TLS config values are only available when the tls feature is enabled.
  • [MediaType::with_params()] and [ContentType::with_params()] are now builder methods.
  • Content-Type [content] responder type names are now prefixed with Raw.
  • The content::Plain responder is now called content::RawText.
  • The content::Custom<T> responder was removed in favor of [(ContentType, T)][(ContentType, T)].
  • TLS config structs are now only available when the tls feature is enabled.
  • Removed CookieJar::get_private_pending() in favor of [CookieJar::get_pending()][CookieJar::get_pending()].
  • The [local_cache!] macro accepts fewer types. Use [local_cache_once!] as appropriate.
  • When requested, the FromForm implementations of Vec and Maps are now properly lenient.
  • To concord with browsers, the [ and ] characters are now accepted in URI paths.
  • The [ and ] characters are no longer encoded by [uri!].
  • [Rocket::launch()][Rocket::launch()] allows Rocket recovery by returning the instance after shutdown.
  • ErrorKind::Runtime was removed; [ErrorKind::Shutdown][ErrorKind::Shutdown] was added.

General Improvements

  • [Rocket] is now #[must_use].
  • Support for HTTP/2 can be disabled by disabling the default http2 crate feature.
  • Added [rocket::execute()][rocket::execute()] for executing Rocket's launch() future.
  • Added the [context!] macro to [rocket_dyn_templates] for ad-hoc template contexts.
  • The time crate is re-exported from the crate root.
  • The FromForm, Responder, and UriDisplay derives now fully support generics.
  • Added helper functions to serde submodules.
  • The [Shield] HSTS preload header now includes includeSubdomains.
  • Logging ignores write! errors if stdout disappears, preventing panics.
  • Added [Client::terminate()][Client::terminate()] to run graceful shutdown in testing.
  • Shutdown now terminates the async runtime, never the process.
HTTP
  • Introduced [Host] and the [&Host] request guard.
  • Added Markdown (text/markdown) as a known media type.
  • Added [RawStr::percent_encode_bytes()].
  • NODELAY is now enabled on all connections by default.
  • The TLS implementation handles handshakes off the main task, improving DoS resistance.
Request
  • Added [Request::host()] to retrieve the client-requested host.
Trait Implementations
  • Arc<T>, Box<T> where T: Responder now implement Responder.
  • [Method] implements Serialize and Deserialize.
  • [MediaType] and [ContentType] implement Eq.
Updated Dependencies
  • The time dependency was updated to 0.3.
  • The handlebars dependency was updated to 4.0.
  • The memcache dependency was updated to 0.16.
  • The rustls dependency was updated to 0.20.

Infrastructure

  • Rocket now uses the 2021 edition of Rust.

Configuration

📅 Schedule: Branch creation - "on the 1st through 7th day of the month" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Never, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, click this checkbox.

This PR has been generated by Mend Renovate. View repository job log here.

Merge request reports

Loading