All Versions
49
Latest Version
Avg Release Cycle
69 days
Latest Release
711 days ago

Changelog History
Page 3

  • v0.3.9 Changes

    April 26, 2018

    Core

    • Core was updated for 2018-04-26 nightly.
    • Minimum required rustc is 1.27.0-nightly 2018-04-26.
    • Managed state retrieval cost was reduced to an unsynchronized HashMap lookup.

    Codegen

    • Codegen was updated for 2018-04-26 nightly.
    • Minimum required rustc is 1.27.0-nightly 2018-04-26.

    Contrib

    • A 512-byte buffer is preallocated when deserializing JSON, improving performance.

    ๐Ÿ“„ Docs

    • Fixed various typos in rustdocs and guide.
  • v0.3.8 Changes

    April 07, 2018

    Codegen

    • Codegen was updated for 2018-04-06 nightly.
    • Minimum required rustc is 1.27.0-nightly 2018-04-06.
  • v0.3.7 Changes

    April 03, 2018

    Core

    • Fixed a bug where incoming request URIs would match routes with the same path prefix and suffix and ignore the rest.
    • Added known media types for WASM, WEBM, OGG, and WAV.
    • Fixed fragment URI parsing.

    Codegen

    • Codegen was updated for 2018-04-03 nightly.
    • Minimum required rustc is 1.27.0-nightly 2018-04-03.

    Contrib

    • JSON data is read eagerly, improving deserialization performance.

    ๐Ÿ“„ Docs

    • Database example and docs were updated for Diesel 1.1.
    • Removed outdated README performance section.
    • Fixed various typos in rustdocs and guide.

    Infrastructure

    • Removed gates for stabilized features: iterator_for_each, i128_type, conservative_impl_trait, never_type.
    • Travis now tests in both debug and release mode.
  • v0.3.6 Changes

    January 12, 2018

    Core

    • Rocket.state() method was added to retrieve managed state from Rocket instances.
    • Nested calls to Rocket.attach() are now handled correctly.
    • JSON API (application/vnd.api+json) is now a known media type.
    • Uncached markers for ContentType and Accept headers are properly preserved on Request.clone().
    • Minimum required rustc is 1.25.0-nightly 2018-01-12.

    Codegen

    • Codegen was updated for 2017-12-22 nightly.
    • Minimum required rustc is 1.24.0-nightly 2017-12-22.

    ๐Ÿ“„ Docs

    • Fixed typo in state guide: simple simply.
    • Database example and docs were updated for Diesel 1.0.

    Infrastructure

    • Shell scripts now use git grep instead of egrep for faster searching.
  • v0.3.5 Changes

    December 18, 2017

    Codegen

    • Codegen was updated for 2017-12-17 nightly.
    • Minimum required rustc is 1.24.0-nightly 2017-12-17.
  • v0.3.4 Changes

    December 14, 2017

    Core

    • NamedFile's Responder implementation now uses a sized body when the file's length is known.
    • #[repr(C)] is used on str wrappers to guarantee correct structure layout across platforms.
    • A status::BadRequest Responder was added.

    Codegen

    • Codegen was updated for 2017-12-13 nightly.
    • Minimum required rustc is 1.24.0-nightly 2017-12-13.

    ๐Ÿ“„ Docs

    • The rustdoc html_root_url now points to the correct address.
    • Fixed typo in fairings guide: event events.
    • Fixed typo in Outcome docs: users Users.
  • v0.3.3 Changes

    September 25, 2017

    Core

    • Config's Debug implementation now respects formatting options.
    • Cow<str> now implements FromParam.
    • Vec<u8> now implements Responder.
    • Added a Binary media type for application/octet-stream.
    • Empty fairing collections are no longer logged.
    • Emojis are no longer emitted to non-terminals.
    • Minimum required rustc is 1.22.0-nightly 2017-09-13.

    Codegen

    • Improved "missing argument in handler" compile-time error message.
    • Codegen was updated for 2017-09-25 nightly.
    • Minimum required rustc is 1.22.0-nightly 2017-09-25.

    ๐Ÿ“„ Docs

    • Fixed typos in site overview: by be, Reponder Responder.
    • Markdown indenting was adjusted for CommonMark.

    Infrastructure

    • Shell scripts handle paths with spaces.
  • v0.3.2 Changes

    August 15, 2017

    Core

    • Added conversion methods from and to Box<UncasedStr>.

    Codegen

    • Lints were removed due to compiler instability. Lints will likely return as a separate rocket_lints crate.
  • v0.3.1 Changes

    August 11, 2017

    Core

    • Added support for ASCII colors on modern Windows consoles.
    • Form field renames can now include any valid characters, not just idents.

    Codegen

    • Ignored named route parameters are now allowed (_ident).
    • Fixed issue where certain paths would cause a lint assert! to fail (#367).
    • Lints were updated for 2017-08-10 nightly.
    • Minimum required rustc is 1.21.0-nightly (2017-08-10).

    Contrib

    • Tera errors that were previously skipped internally are now emitted.

    ๐Ÿ“š Documentation

    • Typos were fixed across the board.
  • v0.3.0 Changes

    July 14, 2017

    ๐Ÿ†• New Features

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

    • Fairings, Rocket's structure middleware, were introduced.
    • [Native TLS support] was introduced.
    • Private cookies were introduced.
    • A MsgPack type has been added to contrib for simple consumption and returning of MessagePack data.
    • Launch failures (LaunchError) from Rocket::launch() are now returned for inspection without panicking.
    • Routes without query parameters now match requests with or without query parameters.
    • [Default rankings] range from -4 to -1, preferring static paths and routes with query string matches.
    • A native Accept header structure was added.
    • The Accept request header can be retrieved via Request::accept().
    • Incoming form fields can be renamed via a new #[form(field = "name")] structure field attribute.
    • All active routes can be retrieved via Rocket::routes().
    • Response::body_string() was added to retrieve the response body as a String.
    • Response::body_bytes() was added to retrieve the response body as a Vec<u8>.
    • Response::content_type() was added to easily retrieve the Content-Type header of a response.
    • Size limits on incoming data are now configurable.
    • Request::limits() was added to retrieve incoming data limits.
    • Responders may dynamically adjust their response based on the incoming request.
    • Request::guard() was added for simple retrieval of request guards.
    • Request::route() was added to retrieve the active route, if any.
    • &Route is now a request guard.
    • The base mount path of a Route can be retrieved via Route::base or Route::base().
    • Cookies supports private (authenticated encryption) cookies, encryped with the secret_key config key.
    • Config::{development, staging, production} constructors were added for Config.
    • Config::get_datetime() was added to retrieve an extra as a Datetime.
    • Forms can be now parsed leniently via the new LenientForm data guard.
    • The ? operator can now be used with Outcome.
    • Quoted string, array, and table based [configuration parameters] can be set via environment variables.
    • Log coloring is disabled when stdout is not a TTY.
    • FromForm is implemented for Option<T: FromForm>, Result<T: FromForm, T::Error>.
    • The NotFound responder was added for simple 404 response construction.

    ๐Ÿ”ง [Native TLS support]: https://rocket.rs/v0.3/guide/configuration/#configuring-tls

    0๏ธโƒฃ [Default rankings]: https://api.rocket.rs/v0.3/rocket/struct.Route.html

    ๐Ÿ”ง [configuration parameters]: https://api.rocket.rs/v0.3/rocket/config/index.html#environment-variables

    ๐Ÿ’ฅ 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.

    • session_key was renamed to secret_key, requires a 256-bit base64 key

      It's unlikely that session_key was previously used. If it was, rename session_key to secret_key. Generate a random 256-bit base64 key using a tool like openssl: openssl rand -base64 32.

    • The &Cookies request guard has been removed in favor of Cookies

      Change &Cookies in a request guard position to Cookies.

    • Rocket::launch() now returns a LaunchError, doesn't panic.

      For the old behavior, suffix a call to .launch() with a semicolon: .launch();.

    • Routes without query parameters match requests with or without query parameters.

      There is no workaround, but this change may allow manual ranks from routes to be removed.

    • The format route attribute on non-payload requests matches against the Accept header.

      Excepting a custom request guard, there is no workaround. Previously, format always matched against the Content-Type header, regardless of whether the request method indicated a payload or not.

    • A type of &str can no longer be used in form structures or parameters.

      Use the new &RawStr type instead.

    • ContentType is no longer a request guard.

      Use &ContentType instead.

    • Request::content_type() returns &ContentType instead of ContentType.

      Use .clone() on &ContentType if a type of ContentType is required.

    • Response::header_values() was removed. Response::headers() now returns an &HeaderMap.

      A call to Response::headers() can be replaced with Response::headers().iter(). A call to Response::header_values(name) can be replaced with Response::headers().get(name).

    • Route collisions result in a hard error and panic.

      There is no workaround. Previously, route collisions were a warning.

    • The IntoOutcome trait has been expanded and made more flexible.

      There is no workaround. IntoOutcome::into_outcome() now takes a Failure value to use. IntoOutcome::or_forward() was added to return a Forward outcome if self indicates an error.

    • The 'testing' feature was removed.

      Remove features = ["testing"] from Cargo.toml. Use the new local module for testing.

    • serde was updated to 1.0.

      There is no workaround. Ensure all dependencies rely on serde 1.0.

    • config::active() was removed.

      Use Rocket::config() to retrieve the configuration before launch. If needed, use managed state to store config information for later use.

    • The Responder trait has changed.

      Responder::respond(self) was removed in favor of Responder::respond_to(self, &Request). Responders may dynamically adjust their response based on the incoming request.

    • Outcome::of(Responder) was removed while Outcome::from(&Request, Responder) was added.

      Use Outcome::from(..) instead of Outcome::of(..).

    • Usage of templates requires Template::fairing() to be attached.

      Call .attach(Template::fairing()) on the application's Rocket instance before launching.

    • The Display implementation of Template was removed.

      Use Template::show() to render a template directly.

    • Request::new() is no longer exported.

      There is no workaround.

    • The FromForm trait has changed.

      Responder::from_form_items(&mut FormItems) was removed in favor of Responder::from_form(&mut FormItems, bool). The second parameter indicates whether parsing should be strict (if true) or lenient (if false).

    • LoggingLevel was removed as a root reexport.

      It can now be imported from rocket::config::LoggingLevel.

    • An Io variant was added to ConfigError.

      Ensure matches on ConfigError include an Io variant.

    • ContentType::from_extension() returns an Option<ContentType>.

      For the old behvavior, use .unwrap_or(ContentType::Any).

    • The IntoValue config trait was removed in favor of Into<Value>.

      There is no workaround. Use Into<Value> as necessary.

    • The rocket_contrib::JSON type has been renamed to rocket_contrib::Json.

      Use Json instead of JSON.

    • All structs in the content module use TitleCase names.

      Use Json, Xml, Html, and Css instead of JSON, XML, HTML, and CSS, respectively.

    General Improvements

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

    • "Rocket" is now capatilized in the Server HTTP header.
    • The generic parameter of rocket_contrib::Json defaults to json::Value.
    • The trailing '...' in the launch message was removed.
    • The launch message prints regardless of the config environment.
    • For debugging, FromData is implemented for Vec<u8> and String.
    • The port displayed on launch is the port resolved, not the one configured.
    • The uuid dependency was updated to 0.5.
    • The base64 dependency was updated to 0.6.
    • The toml dependency was updated to 0.4.
    • The handlebars dependency was updated to 0.27.
    • The tera dependency was updated to 0.10.
    • yansi is now used for all terminal coloring.
    • The dev rustc release channel is supported during builds.
    • Config is now exported from the root.
    • Request implements Clone and Debug.
    • The workers config parameter now defaults to num_cpus * 2.
    • Console logging for table-based config values is improved.
    • PartialOrd, Ord, and Hash are now implemented for State.
    • The format of a request is always logged when available.
    • Route matching on format now functions as documented.

    Infrastructure

    • All examples include a test suite.
    • The master branch now uses a -dev version number.