All Versions
Latest Version
Avg Release Cycle
44 days
Latest Release
179 days ago

Changelog History
Page 1

  • v0.4.5

    May 30, 2020


    ๐Ÿ“„ Docs

    • Fixed various typos.
  • v0.4.4

    March 09, 2020


    • Removed use of unsupported cfg(debug_assertions) in Cargo.toml, allowing for builds on latest nightlies.

    ๐Ÿ“„ Docs

    • Fixed various broken links.
  • v0.4.3

    February 29, 2020


    • Added a new Debug 500 Responder that Debug-prints its contents on response.
    • Specialization on Result was deprecated. Debug can be used in place of non-Responder errors.
    • Fixed an issue that resulted in cookies not being set on error responses.
    • Various Debug implementations on Rocket types now respect formatting options.
    • Added Responders for various HTTP status codes: NoContent, Unauthorized, Forbidden, and Conflict.
    • FromParam is implemented for NonZero core types.


    • Docs for Rocket-generated macros are now hidden.
    • Generated code now works even when prelude imports like Some, Ok, and Err are shadowed.
    • Error messages referring to responder types in routes now point to the type correctly.

    ๐Ÿ“„ Docs

    • All code examples in the guide are now tested and guaranteed to compile.
    • All macros are documented in the core crate; rocket_codegen makes no appearances.


    • CI was moved from Travis to Azure Pipelines; Windows support is tested.
    • Rocket's chat moved to Matrix and Freenode.
  • v0.4.2

    June 29, 2019


    • Replaced use of FnBox with Box<dyn FnOnce>.
    • Removed the stablized feature gates try_from and transpose_result.
    • Derive macros are reexported alongside their respective traits.
    • Minimum required rustc is 1.35.0-nightly (2019-04-05).


    • JsonValue now implements FromIterator.
    • non_snake_case errors are silenced in generated code.
    • Minimum required rustc is 1.33.0-nightly (2019-01-03).


    • Allow setting custom ranks on StaticFiles via StaticFiles::rank().
    • MsgPack correctly sets a MessagePack Content-Type on responses.

    ๐Ÿ“„ Docs

    • Fixed typos across rustdocs and guide.
    • Documented library versions in contrib database documentation.


    • Updated internal dependencies to their latest versions.
  • v0.4.1

    May 11, 2019


    • Rocket's default Server HTTP header no longer overrides a user-set header.
    • Fixed encoding and decoding of certain URI characters.


    • Compiler diagnostic information is more reliably produced.


    • Database pool types now implement DerefMut.
    • Added support for memcache connection pools.
    • Stopped depending on default features from core.

    ๐Ÿ“„ Docs

    • Fixed many typos across the rustdocs and guide.
    • Added guide documentation on mounting more than one route at once.


    • Testing no longer requires "bootstrapping".
    • Removed deprecated isatty dependency in favor of atty.
  • v0.4.0

    December 08, 2018

    ๐Ÿ†• New Features

    ๐Ÿš€ This release includes the following new features:

    ๐Ÿ‘ [ORM agnostic database support]:

    ๐Ÿ“œ [shorthands]:

    ๐Ÿ“‡ [Metadata]:

    0๏ธโƒฃ [Default rankings]:

    Codegen Rewrite

    The rocket_codegen crate has been entirely rewritten using to-be-stable procedural macro APIs. We expect nightly breakages to drop dramatically, likely to zero, as a result. The new prelude import for Rocket applications is:

    - #![feature(plugin)]
    - #![plugin(rocket_codegen)]
    + #![feature(proc_macro_hygiene, decl_macro)]
    - extern crate rocket;
    + #[macro_use] extern crate rocket;

    The rocket_codegen crate should not be a direct dependency. Remove it from your Cargo.toml:

    - rocket = "0.3"
    + rocket = "0.4"
    - rocket_codegen = "0.3"

    ๐Ÿ’ฅ Breaking Changes

    ๐Ÿš€ This release includes many breaking changes. These changes are listed below along with a short note about how to handle the breaking change in existing applications when applicable.

    • Route and catcher attributes respect function privacy.

      To mount a route or register a catcher outside of the module it is declared, ensure that the handler function is marked pub or crate.

    • Query handling syntax has been completely revamped.

      A query parameter of <param> is now <param..>. Consider whether your application benefits from the revamped query string handling.

    • The #[error] attribute and errors! macro were removed.

      Use #[catch] and catchers! instead.

    • Rocket::catch() was renamed to Rocket::register().

      Change calls of the form .catch(errors![..]) to .register(catchers![..]).

    • The #[catch] attribute only accepts functions with 0 or 1 argument.

      Ensure the argument to the catcher, if any, is of type &Request.

    • json! returns a JsonValue, no longer needs wrapping.

      Change instances of Json(json!(..)) to json! and change the corresponding type to JsonValue.

    • All environments default to port 8000.

      Manually configure a port of 80 for the stage and production environments for the previous behavior.

    • Release builds default to the production environment.

      Manually set the environment to debug with ROCKET_ENV=debug for the previous behavior.

    • Form and LenientForm lost a lifetime parameter, get() method.

      Change a type of Form<'a, T<'a>> to Form<T> or Form<T<'a>>. Form<T> and LenientForm<T> now implement Deref<Target = T>, allowing for calls to .get() to be removed.

    • ring was updated to 0.13.

      Ensure all transitive dependencies to ring refer to version 0.13.

    • Uri was largely replaced by Origin.

      In general, replace the type Uri with Origin. The base and uri fields of Route are now of type Origin. The &Uri guard is now &Origin. Request::uri() now returns an Origin.

    • All items in rocket_contrib are namespaced behind modules.

      • Json is now json::Json
      • MsgPack is now msgpack::MsgPack
      • MsgPackError is now msgpack::Error
      • Template is now templates::Template
      • UUID is now uuid::Uuid
      • Value is replaced by json::JsonValue
    • TLS certificates require the subjectAltName extension.

      Ensure that your TLS certificates contain the subjectAltName extension with a value set to your domain.

    • Route paths, mount points, and LocalRequest URIs are strictly checked.

      Ensure your mount points are absolute paths with no parameters, ensure your route paths are absolute paths with proper parameter syntax, and ensure that paths passed to LocalRequest are valid.

    • Template::show() takes an &Rocket, doesn't accept a root.

      Use client.rocket() to get a reference to an instance of Rocket when testing. Use Template::render() in routes.

    • Request::remote() returns the actual remote IP, doesn't rewrite.

      Use Request::real_ip() or Request::client_ip() to retrieve the IP address from the "X-Real-IP" header if it is present.

    • Bind variant was added to LaunchErrorKind.

      Ensure matches on LaunchErrorKind include or ignore the Bind variant.

    • Cookies are automatically tracked and propagated by Client.

      For the previous behavior, construct a Client with Client::untracked().

    • UUID was renamed to Uuid.

      Use Uuid instead of UUID.

    • LocalRequest::cloned_dispatch() was removed.

      Chain calls to .clone().dispatch() for the previous behavior.

    • Redirect constructors take a generic type of T: TryInto<Uri<'static>>.

      A call to a Redirect constructor with a non-'static &str of the form Redirect::to(string) should become Redirect::to(string.to_string()), heap-allocating the string before being passed to the constructor.

    • The FromData impl for Form and LenientForm now return an error of type FormDataError.

      On non-I/O errors, the form string is stored in the variant as an &'f str.

    • Missing variant was added to ConfigError.

      Ensure matches on ConfigError include or ignore the Missing variant.

    • The FromData impl for Json now returns an error of type JsonError.

      The previous SerdeError is now the .1 member of the JsonError enum. Match and destruct the variant for the previous behavior.

    • FromData is now emulated by FromDataSimple.

      Change implementations, not uses, of FromData to FromDataSimple. Consider whether your implementation could benefit from transformations.

    • FormItems iterates over values of type FormItem.

      Map using .map(|item| item.key_value()) for the previous behavior.

    • LaunchErrorKind::Collision contains a vector of the colliding routes.

      Destruct using LaunchErrorKind::Collision(..) to ignore the vector.

    • Request::get_param() and Request::get_segments() are indexed by segment, not dynamic parameter.

      Modify the n argument in calls to these functions appropriately.

    • Method-based route attributes no longer accept a keyed path parameter.

      Change an attribute of the form #[get(path = "..")] to #[get("..")].

    • Json and MsgPack data guards no longer reject requests with an unexpected Content-Type

      To approximate the previous behavior, add a format = "json" route parameter when using Json or format = "msgpack" when using MsgPack.

    • Implemented Responder for Status. Removed Failure, status::NoContent, and status::Reset responders.

      Replace uses of Failure(status) with status directly. Replace status::NoContent with Status::NoContent. Replace status::Reset with Status::ResetContent.

    • Config::root() returns an Option<&Path> instead of an &Path.

      For the previous behavior, use config.root().unwrap().

    • Status::new() is no longer const.

      Construct a Status directly.

    • Config constructors return a Config instead of a Result<Config>.

    • ConfigError::BadCWD, Config.config_path were removed.

    • Json no longer has a default value for its type parameter.

    • Using data on a non-payload method route is a warning instead of error.

    • The raw_form_string method of Form and LenientForm was removed.

    • Various impossible Error associated types are now set to !.

    • All AdHoc constructors require a name as the first parameter.

    • The top-level Error type was removed.

    General Improvements

    In addition to new features, Rocket saw the following improvements:

    • Log messages now refer to routes by name.
    • Collision errors on launch name the colliding routes.
    • Launch fairing failures refer to the failing fairing by name.
    • The default 403 catcher now references authorization, not authentication.
    • Private cookies are set to HttpOnly and are given an expiration date of 1 week by default.
    • A Tera templates example was added.
    • All macros, derives, and attributes are individually documented in rocket_codegen.
    • Invalid client requests receive a response of 400 instead of 500.
    • Response bodies are reliably stripped on HEAD requests.
    • Added a default catcher for 504: Gateway Timeout.
    • Configuration information is logged in all environments.
    • Use of unsafe was reduced from 9 to 2 in core library.
    • FormItems now parses empty keys and values as well as keys without values.
    • Added Config::active() as a shorthand for Config::new(Environment::active()?).
    • Address/port binding errors at launch are detected and explicitly emitted.
    • Flash cookies are cleared only after they are inspected.
    • Sync bound on AdHoc::on_attach(), AdHoc::on_launch() was removed.
    • AdHoc::on_attach(), AdHoc::on_launch() accept an FnOnce.
    • Added Config::root_relative() for retrieving paths relative to the configuration file.
    • Added Config::tls_enabled() for determining whether TLS is actively enabled.
    • ASCII color codes are not emitted on versions of Windows that do not support them.
    • Added FLAC (audio/flac), Icon (image/x-icon), WEBA (audio/webm), TIFF (image/tiff), AAC (audio/aac), Calendar (text/calendar), MPEG (video/mpeg), TAR (application/x-tar), GZIP (application/gzip), MOV (video/quicktime), MP4 (video/mp4), ZIP (application/zip) as known media types.
    • Added .weba (WEBA), .ogv (OGG), .mp4 (MP4), .mpeg4 (MP4), .aac (AAC), .ics (Calendar), .bin (Binary), .mpg (MPEG), .mpeg (MPEG), .tar (TAR), .gz (GZIP), .tif (TIFF), .tiff (TIFF), .mov (MOV) as known extensions.
    • Interaction between route attributes and declarative macros has been improved.
    • Generated code now logs through logging infrastructures as opposed to using println!.
    • Routing has been optimized by caching routing metadata.
    • Form and LenientForm can be publicly constructed.
    • Console coloring uses default terminal colors instead of white.
    • Console coloring is consistent across all messages.
    • i128 and u128 now implement FromParam, FromFormValue.
    • The base64 dependency was updated to 0.10.
    • The log dependency was updated to 0.4.
    • The handlebars dependency was updated to 1.0.
    • The tera dependency was updated to 0.11.
    • The uuid dependency was updated to 0.7.
    • The rustls dependency was updated to 0.14.
    • The cookie dependency was updated to 0.11.


    • All documentation is versioned.
    • Previous, current, and development versions of all documentation are hosted.
    • The repository was reorganized with top-level directories of core and contrib.
    • The http module was split into its own rocket_http crate. This is an internal change only.
    • All uses of unsafe are documented with informal proofs of correctness.
  • v0.4.0-rc.2

    December 01, 2018

    ๐Ÿ‘€ See the CHANGELOG and news article for more information.

  • v0.4.0-rc.1

    October 31, 2018

    ๐Ÿ‘€ See the CHANGELOG and news article for more information.

  • v0.3.17

    September 30, 2018

    ๐Ÿ‘€ See the CHANGELOG for more information.

  • v0.3.16

    August 24, 2018


    • Codegen was updated for 2018-08-23 nightly.
    • Minimum required rustc is 1.30.0-nightly 2018-08-23.


    • Force close only the read end of connections. This allows responses to be sent even when the client transmits more data than expected.

    ๐Ÿ“„ Docs

    • Add details on retrieving configuration extras to guide.