Changelog History
Page 1
-
v0.5.0-rc.2 Changes
May 09, 2022Major 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
impl
s forMediaType
andContentType
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 withRaw
. - The
content::Plain
responder is now calledcontent::RawText
. - The
content::Custom<T>
responder was removed in favor of(ContentType, T)
. - TLS config structs are now only available when the
tls
feature is enabled. - Removed
CookieJar::get_private_pending()
in favor ofCookieJar::get_pending()
. - The [
local_cache!
] macro accepts fewer types. Use [local_cache_once!
] as appropriate. - When requested, the
FromForm
implementations ofVec
andMap
s 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()
allowsRocket
recovery by returning the instance after shutdown.ErrorKind::Runtime
was removed;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()
for executing Rocket'slaunch()
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
, andUriDisplay
derives now fully support generics. - Added helper functions to
serde
submodules. - The [
Shield
] HSTS preload header now includesincludeSubdomains
. - Logging ignores
write!
errors ifstdout
disappears, preventing panics. - Added
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>
whereT: Responder
now implementResponder
.- [
Method
] implementsSerialize
andDeserialize
. - [
MediaType
] and [ContentType
] implementEq
.
⚡️ Updated Dependencies
- The
time
dependency was updated to0.3
. - The
handlebars
dependency was updated to4.0
. - The
memcache
dependency was updated to0.16
. - The
rustls
dependency was updated to0.20
.
Infrastructure
- Rocket now uses the 2021 edition of Rust.
⬆️ [v0.4 to v0.5 migration guide]: https://rocket.rs/v0.5-rc/guide/upgrading-from-0.4/ 🙋 [FAQ]: https://rocket.rs/v0.5-rc/guide/faq/
- Introduced [
-
v0.5.0-rc.1 Changes
June 09, 2021Major Features and Improvements
🚀 This release introduces the following major features and improvements:
- Support for compilation on Rust's stable release channel.
- A rewritten, fully asynchronous core with support for
async
/await
. - [Feature-complete forms support] including multipart, collections, ad-hoc validation, and context.
- Sentinels: automatic verification of application state at start-up to prevent runtime errors.
- Graceful shutdown with configurable signaling, grace periods, notification via
Shutdown
. - An entirely new, flexible and robust [configuration system] based on [Figment].
- Typed asynchronous streams and Server-Sent Events with generator syntax.
- Automatic support for HTTP/2 including
h2
ALPN. - Graduation of
json
,msgpack
, anduuid
rocket_contrib
features into core. - An automatically enabled
Shield
: security and privacy headers for all responses. - Type-system enforced incoming data limits to mitigate memory-based DoS attacks.
- Compile-time URI literals via a fully revamped
uri!
macro. - Full support for UTF-8 characters in routes and catchers.
- Precise detection of unmanaged state and missing database, template fairings with sentinels.
- Typed [build phases] with strict application-level guarantees.
- Ignorable segments: wildcard route matching with no typing restrictions.
- First-class [support for
serde
] for built-in guards and types. - New application launch attributes:
#[launch]
and#[rocket::main]
. - [Default catchers] via
#[catch(default)]
, which handle any status code. - Catcher scoping to narrow the scope of a catcher to a URI prefix.
- Built-in libraries and support for [asynchronous testing].
- A
TempFile
data and form guard for automatic uploading to a temporary file. - A
Capped<T>
data and form guard which enables detecting truncation due to data limits. - Support for dynamic and static prefixing and suffixing of route URIs in
uri!
. - Support for custom config profiles and automatic typed config extraction.
- Rewritten, zero-copy, RFC compliant URI parsers with support for URI-
Reference
s. - Multi-segment parameters (
<param..>
) which match zero segments. - A [
request::local_cache!
] macro for request-local storage of non-uniquely typed values. - A
CookieJar
without "one-at-a-time" limitations. - Singleton fairings with replacement and guaranteed uniqueness.
- Data limit declaration in SI units: "2 MiB",
2.mebibytes()
. - Optimistic responding even when data is left unread or limits are exceeded.
- Fully decoded borrowed strings as dynamic parameters, form and data guards.
- Borrowed byte slices as data and form guards.
- Fail-fast behavior for misconfigured secrets, file serving paths.
- Support for generics and custom generic bounds in
#[derive(Responder)]
. - [Default ranking colors], which prevent more routing collisions automatically.
- Improved error logging with suggestions when common errors are detected.
- Completely rewritten examples including a new real-time
chat
application.
👌 Support for Rust Stable
👍 As a result of support for Rust stable (Rust 2021 Edition and beyond), the
#![feature(..)]
crate attribute is no longer required for Rocket applications. The complete canonical example with a singlehello
route becomes:#[macro_use] extern crate rocket; #[get("/<name>/<age>")] fn hello(name: &str, age: u8) -> String { format!("Hello, {} year old named {}!", age, name) } #[launch] fn rocket() -> _ { rocket::build().mount("/hello", routes![hello]) }
See a diff of the changes from v0.4.
- #![feature(proc_macro_hygiene, decl_macro)] - #[macro_use] extern crate rocket; #[get("/<name>/<age>")] - fn hello(name: String, age: u8) -> String { + fn hello(name: &str, age: u8) -> String { format!("Hello, {} year old named {}!", age, name) } - fn main() { - rocket::ignite().mount("/hello", routes![hello]).launch(); - } + #[launch] + fn rocket() -> _ { + rocket::build().mount("/hello", routes![hello]) + }
💥 Breaking Changes
🚀 This release includes many breaking changes. The most significant changes are listed below.
Silent Changes
These changes are invisible to the compiler and will not yield errors or warnings at compile-time. We strongly advise all application authors to review this list carefully.
- Blocking I/O (long running compute, synchronous
sleep()
,Mutex
,RwLock
, etc.) may prevent the server from making progress and should be avoided, replaced with anasync
variant, or performed in a worker thread. This is a consequence of Rust's cooperativeasync
multitasking. For details, see the new multitasking section of the guide. ROCKET_ENV
is nowROCKET_PROFILE
. A warning is emitted a launch time if the former is set.- The default profile for debug builds is now
debug
, notdev
. - The default profile for release builds is now
release
, notprod
. ROCKET_LOG
is nowROCKET_LOG_LEVEL
. A warning is emitted a launch time if the former is set.ROCKET_ADDRESS
accepts only IP addresses, no longer resolves hostnames likelocalhost
.ROCKET_CLI_COLORS
accepts booleanstrue
,false
in place of strings"on"
,"off"
.- It is a launch-time error if
secrets
is enabled in non-debug
profiles without a configuredsecret_key
. - A misconfigured
template_dir
is reported as an error at launch time. FileServer::new()
fails immediately if the provided directory does not exist.- Catcher collisions result in a launch failure as opposed to a warning.
- Default ranks now range from
-12
to-1
. There is no breaking change if only code generated routes are used. Manually configured routes with negative ranks may collide or be considered in a different order than before. - The order of execution of path and query guards relative to each other is now unspecified.
- URIs beginning with
:
are properly recognized as invalid and rejected. - URI normalization now normalizes the query part as well.
- The
Segments
iterator now returns percent-decoded&str
s. - Forms are now parsed leniently by the
Form
guard. UseStrict
for the previous behavior. - The
Option<T>
form guard defaults toNone
instead of the default value forT
. - When data limits are exceeded, a
413 Payload Too Large
status is returned to the client. - The default catcher now returns JSON when the client indicates preference via the
Accept
header. - Empty boolean form values parse as
true
: the query string?f
is the same as?f=true
. Created<R>
does not automatically send anETag
header ifR: Hash
. UseCreated::tagged_body
instead.FileServer
now forwards when a file is not found instead of failing with404 Not Found
.Shield
is enabled by default. You may need to disable or change policies if your application depends on typically insecure browser features or if you wish to opt-in to different policies than the defaults.CookieJar
get()
s do not return cookies added during request handling. SeeCookieJar
#pending.
Contrib Graduation
- The
rocket_contrib
crate has been deprecated and should no longer be used. - Several features previously in
rocket_contrib
were merged intorocket
itself:json
,msgpack
, anduuid
are now features ofrocket
.- Moved
rocket_contrib::json
torocket::serde::json
. - Moved
rocket_contrib::msgpack
torocket::serde::msgpack
. - Moved
rocket_contrib::uuid
torocket::serde::uuid
. - Moved
rocket_contrib::helmet
torocket::shield
.Shield
is enabled by default. - Moved
rocket_contrib::serve
torocket::fs
,StaticFiles
torocket::fs::FileServer
. - Removed the now unnecessary
Uuid
andJsonValue
wrapper types. - Removed headers in
Shield
that are no longer respected by browsers.
- The remaining features from
rocket_contrib
are now provided by separate crates:- Replaced
rocket_contrib::templates
withrocket_dyn_templates
. - Replaced
rocket_contrib::databases
with [rocket_sync_db_pools
] androcket_db_pools
. - These crates are versioned and released independently of
rocket
. rocket_contrib::databases::DbError
is nowrocket_sync_db_pools::Error
.- Removed
redis
,mongodb
, andmysql
integrations which have upstreamasync
drivers. - The
#[database]
attribute generates an [async run()
] method instead ofDeref
implementations.
- Replaced
General
Rocket
is now generic over a phase marker:- APIs operate on
Rocket<Build>
,Rocket<Ignite>
,Rocket<Orbit>
, orRocket<P: Phase>
as needed. - The phase marker statically enforces state transitions in
Build
,Ignite
,Orbit
order. rocket::ignite()
is now [rocket::build()
], returns aRocket<Build>
.Rocket::ignite()
transitions to theIgnite
phase. This is run automatically on launch as needed.- Ignition finalizes configuration, runs
ignite
fairings, and verifies sentinels. Rocket::launch()
transitions into theOrbit
phase and starts the server.- Methods like
Request::rocket()
that refer to a live Rocket instance return an&Rocket<Orbit>
.
- APIs operate on
- Fairings have been reorganized and restructured for
async
:- Replaced
attach
fairings withignite
fairings. Unlikeattach
fairings, which ran immediately at the time of attachment,ignite
fairings are run when transitioning into theIgnite
phase. - Replaced
launch
fairings withliftoff
fairings.liftoff
fairings are always run, even in local clients, after the server begins listening and the concrete port is known.
- Replaced
- Introduced a new [configuration system] based on [Figment]:
- The concept of "environments" is replaced with "profiles".
ROCKET_ENV
is superseded byROCKET_PROFILE
.ROCKET_LOG
is superseded byROCKET_LOG_LEVEL
.- Profile names can now be arbitrarily chosen. The
dev
,stage
, andprod
profiles carry no special meaning. - The
debug
andrelease
profiles are the default profiles for the debug and release compilation profiles. - A new specially recognized
default
profile specifies defaults for all profiles. - The
global
profile has highest precedence, followed by the selected profile, followed bydefault
. - Added support for limits specified in SI units: "1 MiB".
- Renamed
LoggingLevel
toLogLevel
. - Inlined error variants into the
Error
structure. - Changed the type of
workers
tousize
fromu16
. - Changed accepted values for
keep_alive
: it is disabled with0
, notfalse
oroff
. - Disabled the
secrets
feature (for private cookies) by default. - Removed APIs related to "extras". Typed values can be extracted from the configured
Figment
. - Removed
ConfigBuilder
: all fields ofConfig
are public with constructors for each field type.
- Many functions, traits, and trait bounds have been modified for
async
:FromRequest
,Fairing
,catcher::Handler
,route::Handler
, andFromData
use#[async_trait]
.NamedFile::open
is now anasync
function.- Added
Request::local_cache_async()
for use in async request guards. - Unsized
Response
bodies must be [AsyncRead
] instead ofRead
. - Automatically sized
Response
bodies must be [AsyncSeek
] instead ofSeek
. - The
local
module is split into two:rocket::local::asynchronous
androcket::local::blocking
.
- Functionality and features requiring Rust nightly were removed:
- Removed the
Try
implementation onOutcome
which allowed using?
withOutcome
s. The recommended replacement is therocket::outcome::try_outcome!
macro or the various combinator functions onOutcome
. Result<T, E>
implementsResponder
only when bothT
andE
implementResponder
. The newDebug
wrapping responder replacesResult<T: Responder, E: Debug>
.- APIs which used the
!
type to now usestd::convert::Infallible
.
- Removed the
Rocket::register()
now takes a base path to scope catchers under as its first argument.ErrorKind::Collision
has been renamed toErrorKind::Collisions
.
Routing and URIs
- In
#[route(GET, path = "...")]
,path
is nowuri
:#[route(GET, uri = "...")]
. - Multi-segment paths (
/<p..>
) now match zero or more segments. - Codegen improvements preclude identically named routes and modules in the same namespace.
- A route URI like (
/<a>/<p..>
) now collides with (/<a>
), requires arank
to resolve. - All catcher related types and traits moved to
rocket::catcher
. - All route related types and traits moved to
rocket::route
. - URI formatting types and traits moved to
rocket::http::uri::fmt
. T
no longer converts toOption<T>
orResult<T, _>
foruri!
query parameters.- For optional query parameters,
uri!
requires using a wrapped value or_
. &RawStr
no longer implementsFromParam
: use&str
instead.- Percent-decoding is performed before calling
FromParam
implementations. RawStr::url_decode()
andRawStr::url_decode_lossy()
allocate as necessary, returnCow
.RawStr::from_str()
was replaced withRawStr::new()
.Origin::segments()
was replaced withOrigin.path().segments()
.Origin::path()
andOrigin::query()
return&RawStr
instead of&str
.- The type of
Route::name
is nowOption<Cow<'static, str>>
. Route::set_uri
was replaced withRoute::map_base()
.Route::uri()
returns a newRouteUri
type.Route::base
was removed in favor ofRoute.uri().base()
.
Data and Forms
Data
now has a lifetime:Data<'r>
.Data::open()
indelibly requires a data limit.- Removed
FromDataSimple
. UseFromData
andlocal_cache!
orlocal_cache_once!
. - All
DataStream
APIs require limits and returnCapped<T>
types. - Form types and traits were moved from
rocket::request
torocket::form
. - Removed
FromQuery
. Dynamic query parameters (#[get("/?<param>")]
) useFromForm
instead. - Replaced
FromFormValue
withFromFormField
. AllT: FromFormField
implementFromForm
. - Form field values are percent-decoded before calling
FromFormField
implementations. - Renamed the
#[form(field = ...)]
attribute to#[field(name = ...)]
.
Request Guards
- Renamed
Cookies
toCookieJar
. Its methods take&self
. - Renamed
Flash.name
toFlash.kind
,Flash.msg
toFlash.message
. - Replaced
Request::get_param()
withRequest::param()
. - Replaced
Request::get_segments()
toRequest::segments()
. - Replaced
Request::get_query_value()
withRequest::query_value()
. - Replaced
Segments::into_path_buf()
withSegments::to_path_buf()
. - Replaced
Segments
andQuerySegments
withSegments<Path>
andSegments<Query>
. Flash
constructors to takeInto<String>
instead ofAsRef<str>
.- The
State<'_, T>
request guard is now&State<T>
. - Removed a lifetime from
FromRequest
:FromRequest<'r>
. - Removed a lifetime from
FlashMessage
:FlashMessage<'_>
. - Removed all
State
reexports exceptrocket::State
.
Responders
- Moved
NamedFile
torocket::fs::NamedFile
- Replaced
Content
withcontent::Custom
. Response::body
andResponse::body_mut
are now infallible methods.- Renamed
ResponseBuilder
toBuilder
. - Removed direct
Response
body reading methods. Use methods onr.body_mut()
instead. - Removed inaccurate "chunked body" types and variants.
- Removed
Responder
impl
forResponse
. Prefer custom responders with#[derive(Responder)]
. - Removed the unused reason phrase from
Status
.
General Improvements
In addition to new features and major improvements, Rocket saw the following improvements:
General
- Added support for raw identifiers in the
FromForm
derive,#[route]
macros, anduri!
. - Added support for uncased derived form fields:
#[field(name = uncased(...))]
. - Added support for [default form field values]:
#[field(default = expr())]
. - Added support for multiple
#[field]
attributes on struct fields. - Added support for base16-encoded (a.k.a. hex-encoded) secret keys.
- Added
Config::ident
for configuring or removing the globalServer
header. - Added
Rocket::figment()
andRocket::catchers()
. - Added
LocalRequest::json()
andLocalResponse::json()
. - Added
LocalRequest::msgpack()
andLocalResponse::msgpack()
. - Added support for
use m::route; routes![route]
instead of needingroutes![m::route]
. - Added support for hierarchical data limits: a limit of
a/b/c
falls back toa/b
thena
. - Added
LocalRequest::inner_mut()
.LocalRequest
implementsDerefMut
toRequest
. - Added support for ECDSA and EdDSA TLS keys.
- Added associated constants in
Config
for all config parameter names. - Added
ErrorKind::Config
to represent errors in configuration at runtime. - Added
rocket::fairing::Result
type alias, returned byFairing::on_ignite()
. - All guard failures are logged at runtime.
Rocket::mount()
now accepts a base value of any type that implementsTryInto<Origin<'_>>
.- The default error catcher's HTML has been compacted.
- The default error catcher returns JSON if requested by the client.
- Panics in routes or catchers are caught and forwarded to
500
error catcher. - A detailed warning is emitted if a route or catcher panics.
- Emoji characters are no longer output on Windows.
- Fixed
Error
to not panic if a panic is already in progress. - Introduced
Reference
andAsterisk
URI types. - Added support to
UriDisplayQuery
for C-like enums. - The
UriDisplayQuery
derive now recognizes the#[field]
attribute for field renaming. Client
method builders acceptTryInto<Origin>
allowing auri!()
to be used directly.Redirect
now accepts aTryFrom<Reference>
, allowing fragment parts.
HTTP
- Added support for HTTP/2, enabled by default via the
http2
crate feature. - Added AVIF (
image/avif
) as a known media type. - Added
EventStream
(text/event-stream
) as a known media type. - Added a
const
constructor forMediaType
. - Added aliases
Text
,Bytes
for thePlain
,Binary
media types, respectively. - Introduced
RawStrBuf
, an ownedRawStr
. - Added many new "pattern" methods to
RawStr
. - Added
RawStr::percent_encode()
andRawStr::strip()
. - Added support for unencoded query characters in URIs that are frequently sent by browsers.
Request
- Added support for all UTF-8 characters in route paths.
- Added support for percent-encoded
:
in socket or IP address values in [FromFormValue
]. - Added
Request::rocket()
to access the activeRocket
instance. Request::uri()
now returns an&Origin<'r>
instead of&Origin<'_>
.Request::accept()
,Request::content_type()
reflect changes toAccept
,Content-Type
.Json<T>
,MsgPack<T>
acceptT: Deserialize
, not onlyT: DeserializeOwned
.- Diesel SQLite connections in
rocket_sync_db_pools
use better defaults. - The default number of workers for synchronous database pools is now
workers * 4
.
Response
- Added
Template::try_custom()
for fallible template engine customization. - Manually registered templates can now be rendered with
Template::render()
. - Added support for the
X-DNS-Prefetch-Control
header toShield
. - Added support for manually-set
expires
values for private cookies. - Added support for type generics and custom generic bounds to
#[derive(Responder)]
. - The
Server
header is only set if one isn't already set. - Accurate
Content-Length
headers are sent even for partially readBody
s.
Trait Implementations
- Implemented
Clone
forState
. - Implemented
Copy
andClone
forfairing::Info
. - Implemented
Debug
forRocket
andClient
. - Implemented
Default
forStatus
(returnsStatus::Ok
). - Implemented
PartialEq
,Eq
,Hash
,PartialOrd
, andOrd
forStatus
. - Implemented
Eq
,Hash
, andPartialEq<&str>
forOrigin
. - Implemented
PartialEq<Cow<'_, RawStr>>>
forRawStr
. - Implemented
std::error::Error
forError
. - Implemented
Deref
andDerefMut
forLocalRequest
(toRequest
). - Implemented
DerefMut
forForm
,LenientForm
. - Implemented
From<T>
forJson<T>
,MsgPack<T>
. - Implemented
TryFrom<String>
andTryFrom<&str>
forOrigin
. - Implemented
TryFrom<Uri>
for each of the specific URI variants. - Implemented
FromRequest
for&Config
. - Implemented
FromRequest
forIpAddr
. - Implemented
FromParam
forPathBuf
- Implemented
FromParam
,FromData
, andFromForm
for&str
. - Implemented
FromForm
forJson<T>
,MsgPack<T>
. - Implemented
FromFormField
forCow
andCapped<Cow>>
- Implemented
Responder
fortokio::fs::File
. - Implemented
Responder
for(ContentType, R) where R: Responder
. - Implemented
Responder
for(Status, R) where R: Responder
which overridesR
's status. - Implemented
Responder
forstd::io::Error
(behaves asDebug<std::io::Error>
). - Implemented
Responder
forEither<T, E>
, equivalently toResult<T, E>
. - Implemented
Serialize
forFlash
. - Implemented
Serialize
,Deserialize
,UriDisplay
andFromUriParam
foruuid::Uuid
- Implemented
Serialize
,Deserialize
forRawStr
. - Implemented
Serialize
,Deserialize
for all URI types.
⚡️ Updated Dependencies
- The
serde
dependency was introduced (1.0
). - The
futures
dependency was introduced (0.3
). - The
state
dependency was updated to0.5
. - The
time
dependency was updated to0.2
. - The
binascii
dependency was introduced (0.1
). - The
ref-cast
dependency was introduced (1.0
). - The
atomic
dependency was introduced (0.5
). - The
parking_lot
dependency was introduced (0.11
). - The
ubtye
dependency was introduced (0.10
). - The
figment
dependency was introduced (0.10
). - The
rand
dependency was introduced (0.8
). - The
either
dependency was introduced (1.0
). - The
pin-project-lite
dependency was introduced (0.2
). - The
indexmap
dependency was introduced (1.0
). - The
tempfile
dependency was introduced (3.0
). - The
async-trait
dependency was introduced (0.1
). - The
async-stream
dependency was introduced (0.3
). - The
multer
dependency was introduced (2.0
). - The
tokio
dependency was introduced (1.6.1
). - The
tokio-util
dependency was introduced (0.6
). - The
tokio-stream
dependency was introduced (0.1.6
). - The
bytes
dependency was introduced (1.0
). - The
rmp-serde
dependency was updated to0.15
. - The
uuid
dependency was updated to0.8
. - The
tera
dependency was updated to1.10
. - The
handlebars
dependency was updated to3.0
. - The
normpath
dependency was introduced (0.3
). - The
postgres
dependency was updated to0.19
. - The
rusqlite
dependency was updated to0.25
. - The
r2d2_sqlite
dependency was updated to0.18
. - The
memcache
dependency was updated to0.15
.
Infrastructure
- Rocket now uses the 2018 edition of Rust.
- Added visible
use
statements to examples in the guide. - Split examples into a separate workspace from the non-example crates.
- Updated documentation for all changes.
- Fixed many typos, errors, and broken links throughout documentation and examples.
- Improved the general robustness of macros, and the quality and frequency of error messages.
- Benchmarks now use
criterion
and datasets extracted from real-world projects. - Fixed the SPDX license expressions in
Cargo.toml
files. - Added support to
test.sh
for a+
flag (e.g.+stable
) to pass tocargo
. - Added support to
test.sh
for extra flags to be passed on tocargo
. - Migrated CI to Github Actions.
👍 [Feature-complete forms support]: https://rocket.rs/v0.5-rc/guide/requests/#forms 🔧 [configuration system]: https://rocket.rs/v0.5-rc/guide/configuration/#configuration
✅ [asynchronous testing]: https://rocket.rs/v0.5-rc/guide/testing/#asynchronous-testing
🏗 [build phases]: https://api.rocket.rs/v0.5-rc/rocket/struct.Rocket.html#phases
👍 [support for
serde
]: https://api.rocket.rs/v0.5-rc/rocket/serde/index.html0️⃣ [default ranking colors]: https://rocket.rs/v0.5-rc/guide/requests/#default-ranking
🔀 [
async run()
]: https://api.rocket.rs/v0.5-rc/rocket_sync_db_pools/index.html#handlers0️⃣ [default form field values]: https://rocket.rs/v0.5-rc/guide/requests/#defaults
📄 [Figment]: https://docs.rs/figment/0.10/figment/
0️⃣ [default catchers]: https://rocket.rs/v0.5-rc/guide/requests/#default-catchers
🏗 [
rocket::build()
]: https://api.rocket.rs/v0.5-rc/rocket/struct.Rocket.html#method.build🔧 [configuration system]: https://rocket.rs/v0.5-rc/guide/configuration/ 🔀 [
Poolable
]: https://api.rocket.rs/v0.5-rc/rocket_sync_db_pools/trait.Poolable.html📄 [
AsyncRead
]: https://docs.rs/tokio/1/tokio/io/trait.AsyncRead.html 👀 [AsyncSeek
]: https://docs.rs/tokio/1/tokio/io/trait.AsyncSeek.html👍 [
uuid
support]: https://api.rocket.rs/v0.5-rc/rocket/serde/uuid/index.html🔀 [
rocket_sync_db_pools
]: https://api.rocket.rs/v0.5-rc/rocket_sync_db_pools/index.html🔧 [mutual TLS]: https://rocket.rs/v0.5-rc/guide/configuration/#mutual-tls
-
v0.4.10 Changes
May 21, 2021Core
- [
3276b8
] Removed used ofunsafe
inOrigin::parse_owned()
, fixing a soundness issue.
- [
-
v0.4.9 Changes
May 19, 2021 -
v0.4.8 Changes
May 18, 2021 -
v0.4.7 Changes
February 09, 2021 -
v0.4.6 Changes
November 09, 2020Core
- [
86bd7c
] Added default and configurable read/write timeouts:read_timeout
andwrite_timeout
. - [
c24a96
] Added thesse
feature, which enables flushing by returningio::ErrorKind::WouldBlock
.
📄 Docs
- Fixed broken doc links in
contrib
. - Fixed database library versions in
contrib
docs.
Internal
- Updated source code for Rust 2018.
- UI tests now use
trybuild
instead ofcompiletest-rs
.
- [
-
v0.4.5 Changes
May 30, 2020Core
- [#1312,
89150f
] Fixed a low-severity, minimal impact soundness issue inLocalRequest::clone()
. - [#1263,
376f74
] Fixed a cookie serialization issue that led to incorrect cookie deserialization in certain cases. - Removed dependency on
ring
for private cookies and thus Rocket, by default. - Added
Origin::map_path()
for manipulatingOrigin
paths. - Added
handler::Outcome::from_or_forward()
. - Added
Options::NormalizeDirs
option toStaticFiles
. - Improved accessibility of default error HTML.
📄 Docs
- Fixed various typos.
- [#1312,
-
v0.4.4 Changes
March 09, 2020Core
- Removed use of unsupported
cfg(debug_assertions)
inCargo.toml
, allowing for builds on latest nightlies.
📄 Docs
- Fixed various broken links.
- Removed use of unsupported
-
v0.4.3 Changes
February 29, 2020Core
- Added a new
Debug
500
Responder
thatDebug
-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
Responder
s for various HTTP status codes:NoContent
,Unauthorized
,Forbidden
, andConflict
. FromParam
is implemented forNonZero
core types.
Codegen
- Docs for Rocket-generated macros are now hidden.
- Generated code now works even when prelude imports like
Some
,Ok
, andErr
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.
Infrastructure
- Added a new