Changelog History
Page 1
-
v0.15.0 Changes
November 13, 2020This patch adds
Server::bind
,SessionMiddleware::with_cookie_domain
, and a new optional cookies feature.Server::bind
Tide v0.15.0 introduces a new way to start servers:
Server::bind
. This enables separatining "open the socket" from "start accepting connections" whichServer::listen
does for you in a single call.๐ This was introduced as a way to enable users to log messages after ports were successfully opened. But it can also be used to synchronize server initialization. For example: your application may want to connect to a database, a cache, and open an HTTP connection. With
Server::bind
you can start the connection, but wait to handle inbound traffic until all other components of the server have started up.๐ When
Server::bind
is called, it returns an instance ofListener
which is able to return information on all ports that are being listened on. By defaultServer::listen
logs these out, but when manually callingServer::bind
you get control on how to log this info.๐ For now
ListenInfo
only includes a few basics such as the address that's being listened on, and whether the connection is encrypted. But as we seek to stabilize and integratetide-rustls
intotide
, we may include more info on the encryption settings. And perhaps in the future we'll include more information on the server's routes too. But for now this serves as an entry point for all that.use tide::prelude::\*;let mut app = tide::new(); app.at("/").get(|\_| async { Ok("Hello, world!") });let mut listener = app.bind("127.0.0.1:8080").await?;for info in listener.info().iter() { println!("Server listening on {}", info); } listener.accept().await?;
SessionMiddleware::with_cookie_domain
Our session middleware now supports a
with_cookie_domain
method to scope a cookie to a specific domain. We already support various cookie options when constructing the session middleware, and now we support scoping the domain as well.let SECRET = b"please do not hardcode your secret";let mut app = tide::new(); app.with(SessionMiddleware::new(MemoryStore::new(), SECRET) .with\_cookie\_name("custom.cookie.name") .with\_cookie\_path("/some/path") .with\_cookie\_domain("www.rust-lang.org") // This is new. .with\_same\_site\_policy(SameSite::Lax) .with\_session\_ttl(Some(Duration::from\_secs(1))) .without\_save\_unchanged(), );
http-types
typed headers๐ We've been doing a lot of work on typed headers through
http-types
, which is the HTTP library underpinning both tide and surf. We're getting close to being done implementing all of the specced HTTP Headers, and will then move to integrate them more closely into Tide. You can find the release notes forhttp-types
here.โ Added
- โ Add
Server::bind
#740 - Add
with_cookie_domain
method toSessionMiddleware
#730 - โ Add an optional cookies feature #717
๐ Fixed
Internal
- ๐ Lints #704
- โ Add
-
v0.14.0 Changes
October 16, 2020๐ Documentation
๐ This patch introduces a several feature flags to opt-out of dependencies, a reworked rustdoc landing page, and a variety of bug fixes. Over the past few months we've been hard at work on Surf v2.0.0, and have made a lot of progress on
http-types
' typed headers. We hope to start bringing some of this work over into Tide soon.Behind the scenes we're also hard at work at improving our processes. Both Tide and the wider http-rs project have really taken off, and our biggest challenge in ensuring we correctly prioritize, communicate, and empower people who want to get involved. We don't have specifics we can share yet, but it's something we're actively working on with the team. Because as Tide and http-rs grow, so must our processes.
โ Added
- Implement
Endpoint
forBox<dyn Endpoint>
#710 - โ Add a
http_client::HttpClient
implementation fortide::Server
#697 - Introduce a
logger
feature to optionally disable thefemme
dependency #693 - โ Add
Server::state
method #675
๐ Changed
- โ Remove parsing from
Request::param
#709 - ๐ Rework landing docs #708
- โ Log: display client error messages when possible as warnings #691
- ๐ Make all listeners conditional on
h1-server
feature #678
๐ Fixed
- ๐จ Logger: properly print debug from errors #721
- ๐ Fix missing as_ref that caused boxed endpoints to enter an infinite loop #711
- ๐ Bugfix, route prefix was always set to false after calling nest #702
- ๐ Fix a broken documentation link #685
Internal
- โฌ๏ธ Upgrade deps #722
- ๐ CI, src: run clippy on nightly, apply fixes #707
- โก๏ธ Update to latest Surf alpha in tests #706
- ๐ Fix .github #705
- โ Add driftwood to middleware section #692
- ๐จ Refactor README #683
- Main branch renamed to
main
#679 - โฌ๏ธ Bump version number in README.md #672
- โ Add community resources to readme instead of wiki #668
- Implement
-
v0.13.0 Changes
July 31, 2020๐ Docs
๐ This release introduces first-class support for sessions, fixes a
0๏ธโฃ long-standing bug with our default middleware, clarifies our stability
guarantees, and renamed the API to register middleware through.Sessions
๐ We're excited to announce initial support for sessions in Tide. This feature
enables Tide applications to associate multiple separate requests as
๐ belonging to the same origin. Which is a pre-requisite to build common
๐ web-app features such as user accounts, multi-request transactions, and
channels.๐ Tide sessions are generic over backend stores and signing strategy. It builds
๐ on the newly releasedasync-session
๐ 2.0.0 library, which is a set of common
traits that types that make up a session. But beyond that, much of it is
implementation specific.0๏ธโฃ Tide ships with a
memory
andcookie
store by default. However we have
also published several convenient session store implementations for common
databases, providing a nice selection to choose from:- Memory Session (shipped with Tide)
- Cookie Session (shipped with Tide)
- ๐ async-sqlx-session (SQLite only for now; we hope to support more)
- ๐ async-redis-session
- ๐ async-mongodb-session
Using "Redis" as the backing session store for Tide is as easy as writing 3
lines and including a dependency in your Cargo.toml:use async\_redis\_session::RedisSessionStore;use tide::sessions::SessionMiddleware;use tide::{Redirect, Request}; #[async\_std::main]async fn main() -\> tide::Result\<()\> { let mut app = tide::new(); // Create a Redis-backed session store and use it in the applet store = RedisSessionStore::new("redis://127.0.0.1:6379")?; let secret = std::env::var("SESSION\_SECRET").unwrap(); app.with(SessionMiddleware::new(store, secret.as\_bytes())); app.at("/").get(|mut req: Request\<()\>| async move { // Store a counter in the session; increment it by one on each visitlet session = req.session\_mut(); let visits: usize = session.get("visits").unwrap\_or\_default(); session.insert("visits", visits + 1).unwrap(); // Render a page that shows the number of requests made in the sessionlet visits: usize = req.session().get("visits").unwrap(); Ok(format!("you have visited this website {} times", visits)) }); // Close the current session app.at("/reset").get(|mut req: Request\<()\>| async move { req.session\_mut().destroy(); Ok(Redirect::new("/")) }); // Start the server app.listen("127.0.0.1:8080").await?; Ok(()) }
It's still early for Tide sessions. But we're incredibly excited for how
convenient it already is, and excited for the possibilities this will enable!Renaming Server::middleware to Server::with
This patch renames
Server::middleware
toServer::with
in order to
streamline much of the middleware APIs.// After this patchlet mut app = tide::new(); app.with(MyMiddleware::new()); app.at("/").get(|\_| async move { Ok("hello chashu") }); app.listen("localhost:8080").await?;// Before this patchlet mut app = tide::new(); app.middleware(MyMiddleware::new()); app.at("/").get(|\_| async move { Ok("hello chashu") }); app.listen("localhost:8080").await?;
A small change, but ever so convenient.
๐ฒ No more duplicate log messages
0๏ธโฃ Ever since we introduced application nesting we've had issues with default
๐ middleware running twice. This patch fixes that for our logging middleware in
two ways:0๏ธโฃ 1. We've introduced a
logger
Cargo feature to disable the default logging middleware #661- We now track calls to the logger inside the state map to ensure
it's only called once per app #662
โก๏ธ There may be room to optimize this further in the future, and perhaps extend
the same mechanisms to work for more built-in middleware. But for now this
patch resolves the most common issues people were reporting.Clarification on stability
๐ Tide has been deployed to production in many places: independent authors
๐ taking control of their publishing pipelines, software professionals building
internal tooling, and enterprises running it in key parts of their
infrastructure.๐ In past Tide releases shipped with a warning that actively recommended
๐ against using it in any critical path. However we've chosen to no longer
๐ include that warning starting this release. Much of the work at the protocol
layer and below has completed, and we've received positive reports on how it
performs.For the foreseable future Tide will remain on the
0.x.x
semver range. While
we're confident in our foundations, we want to keep iterating on the API.
๐ Once we find that work has slowed down we may decide when to release a 1.0.0
๐ release.โ Added
- โ Added
From<StatusCode> for Response
#650 - โ Added a feature-flag to disable the default logger middleware #661
- โ Added
impl Into<Request> for http_types::Request
#670
๐ Changes
- ๐ Rename
Server::middleware
toServer::with
#666 - โฌ๏ธ Relax Sync bound on Fut required on sse::upgrade #647
- Consistency improvements for examples #651
- โฌ๏ธ Bumped version number in docs #652
- โ Add enable logging in README example #657
- โ Remove "experimental" warning #667
๐ Fixes
- ๐ฒ Guarantee the log middleware is only run once per request #662
Internal
-
v0.12.0 Changes
July 17, 2020๐ Docs
๐ This release includes 35 PRs merged over the course of the last month. Most
notably we've streamlined how errors are propagated inside middleware,
๐ฏ introduced a newResponseBuilder
type,State
must now beClone
, and we
are introducing an extensible API forServer::listen
.ResponseBuilder
Returning responses from endpoints is often different from operating on
response in middleware. In order to make it easier for people to author
responses we're introducingtide::ResponseBuilder
in this patch!๐ You can create a new response builder by calling
Response::builder
and
passing it a status code. This enables writing some really concise endpoints:app.at("/").get(|\_| async { let res = Response::builder(203) .body(json!({ "hello": "cats!" })) .header("X-Nori", "me-ow") .header("X-Chashu", "meewwww"); Ok(res) })
This sets Tide up really nicely for the future too; once we have async
closures, and a resolution for Ok-wrapping (fingers crossed) this will be
even more concise. We're excited for developments in the language!Server listen
๐ Tide now supports extensions for
App::listen
. This patch introduces a newListener
trait that is
implemented forstd
types such asTcpStream
,SocketAddr
and
UnixStream
. But can also be implemented by users of Tide to provide custom
transports.๐ In particular, what this enables us to do is to start trialing TLS support in
external crates. We'll soon have
tide-rustls
available as an external
๐ crate that will enable building TLS-terminating Tide servers:let mut app = tide::new();let listener = TlsListener::build() .addrs("localhost:4433") .cert(cert) .key(key); app.listen(listener).await?;
In addition we're shipping
tide::listener::ConcurrentListener
, a convenient
constructor to have a single server respond to incoming requests from
multiple transports. For example, some applications may want to listen on
both IPv4 and IPv6. WithConcurrentListener
that's possible:use std::net::{Ipv4Addr, Ipv6Addr};use tide::listener;let mut app = tide::new();let mut listener = listener::ConcurrentListener::new(); listener.add((Ipv4Addr::new(127, 0, 0, 1), 8000)); listener.add((Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1), 8000)); app.listen(listener).await?;
๐ฏ State must be Clone
One problem we had for a while was that when manually nesting or
parallelizing applications,State
would be wrapped in anArc
multiple
times. In this patch we're solving that by providing people with more control
๐ฏ around howState
is shared by requiringState
to implementClone
.๐ฏ In most existing applications
State
can be madeClone
by manually
wrapping it in anArc::new
. But it's also possible to wrap individual
๐ฏ fields in anArc
and deriving `Clone for the whole struct, as we did in one
of our examples:// Example state before this patch.struct State { users: RwLock\<Vec\<User\>\>, }// Example state after this patch.#[derive(Clone)]struct State { users: Arc\<RwLock\<Vec\<User\>\>\>, }
There is no right answer how to structure
State
; but we wanted to enable
people to factor it in the way that makes most sense for their applications.Using of async-trait
We've migrated all of our traits to use
async-trait
. This should make it easier to authorMiddleware
implementations. For convenience Tide re-exports astide::utils::async_trait
.๐ Changes in middleware error handling
Before this patch, calling
next().await?
in middleware would return a
Result<Response>
. The idea was that theErr
variant could freely be
thrown up the middleware stack, and transformed into aResponse
at the top
of the stack. However in practice this didn't turn out great: middleware such
as CORS needed to manipulate theErr
path to ensure the right headers were
set. And we didn't provide an interface for this.So instead this patch changes the way we handle errors in middleware. We
still enable?
to be used inside middleware, but between each middleware we
convertResult<Response, tide::Error>
into aResponse
, and if an error
occurred, we populate the newly introducedResponse::error
field.This means that middleware can always assume there is a valid
Response
coming through, and no longer needs to check bothOk
andErr
branch
returned bynext().await
. An example:/// Before this patch: need to check both branches.async fn my\_middleware\<State\>(req: Request\<State\>, next: Next) -\> Result\<Response\> { println!("before"); match next().await { Err(err) =\> { println!("status code {}", err.status()); Err(err) } Ok(res) =\> { println!("status code {}", res.status()); Ok(res) } } }/// With this patch: there's only a single branch to operate on.async fn my\_middleware\<State\>(req: Request\<State\>, next: Next) -\> Result\<Response\> { println!("before"); let res = next().await; println!("status code {}", res.status()); Ok(res) }
Note: neither of these examples will quite compile until we have async
closures, but it serves to illustrate the point.โ Added
- โ Add a doc example for
Request::body_form
#631 - โ Add a doc example for
Request::query
#630 - โ Add an upload example #619
- โ Add extensible entrypoint for
Server::listen
#610 - โ Add
From<Body> for Response
#584 - โ Add
ResponseBuilder
#580 - โ Add
Response::error
#570 - โ Add CORS headers to error responses #546
๐ Changed
- ๐ Use
async_trait
to simplify async signatures #639 - ๐ฒ Also include port and host in the log string #634
- Don't panic on missing path param #615
- Return a result from
sse::Sender::send
#598 - ๐ Relax the lifetime requirements of
Server::at
#597 - In middleware
Next::run
now returnsResponse
instead ofResult<Response>
#570 - ๐ Rename
tide::middleware
totide::utils
#567 - ๐ฏ Require
State
to beClone
#644
๐ Fixed
- ๐ Make
ServeDir
return 404 if file does not exists #637 - ๐ Remove
#[must_use]
forResponse::set_status()
#612 - Do not await the spawned task in
Server::listen
#606 - ๐ Allow route based function middlewares #600
- ๐ Fix CORS middleware to retain cookies #599
- Enable SSE senders to break out of loops #598
- โ Remove extra unwraps from
insert_header
calls #590 #588 #583 - Don't crash the server when there's a listen error #587
- โ Add CORS headers to error responses #546
Internal
- โ Remove
executable
mode from lib.rs #635 - โก๏ธ Update to async-sse 4.0.0 #632
- ๐ Comment cleanup fixes #622
- โ Add clippy to ci #618
- โช Restore .github docs #616
- ๐ Use route-recognizer 0.2 #607
- โ Introduce an extension trait for testing servers #601
- โก๏ธ Update the readme with the latest versions #594
- ๐ Fix tempfile usage in tests #592
- ๐ Fix CI #589
- โ Remove unnecessary
move
s from route handlers #581
- โ Add a doc example for
-
v0.11.0 Changes
June 12, 2020๐ This patch introduces several minor features and fixes. This is a small release which picks up on some of the details we missed in our last few large releases.
โ Added
๐ Changed
Response::set_status
no longer takes and returnsself
#572
๐ Fixes
Internal
-
v0.10.0 Changes
June 05, 2020๐ Docs
This release updates tide's
Request
andResponse
types to matchhttp_types
'sRequest
andResponse
, a newServer::listen_unix
method to listen on Unix Domain Sockets, and the ability to returnjson!
literals directly from endpoints.โ Added
- โ Added
Server::listen_unix
#531 - โ Added
Request::peer_addr
#530 - โ Added
Request::local_addr
#530 - โ Added
Request::remote
#537 - โ Added
Request::host
#537 - โ Added
Request::header_mut
#537 - โ Added
Request::append_header
#537 - โ Added
Request::remove_header
#537 - โ Added
Request::iter
#537 - โ Added
Request::iter_mut
#537 - โ Added
Request::header_names
#537 - โ Added
Request::header_values
#537 - โ Added
Request::query
#537 - โ Added
Request::content_type
#537 - โ Added warning about domain/path inconsistencies to
remove_cookie
#533 - โ Added an optional
name
method toMiddleware
#545 - โ Added
AsRef/AsMut<Headers>
forRequest/Response
#553 - โ Added
Request::take_body
#550 - โ Added
Response::swap_body
#562 - โ Added
Response::iter
#550 - โ Added
Response::iter_mut
#550 - โ Added
Response::header_names
#550 - โ Added
Response::header_values
#550 - โ Added
Response::content_type
#550 - Added
Response::set_content_type
#550 - โ Added
Response::header_mut
#562 - โ Added
tide::{After, Before}
middleware constructors #556 - โ Added support for returning JSON literals from endpoints #523
Response::new
now acceptsu16
as well asStatusCode
as arguments #562- โ Added a new
convert
submodule which holds various conversion-related types, includingserde
#564
๐ Changed
- ๐ Renamed
Request::uri
toRequest::url
#537 Request::body_bytes
now returnstide::Result
#537Request::body_string
now returnstide::Result
#537Request::body_json
now returnstide::Result
#537Request::body_form
now returnstide::Result
#537Request::set_ext
no longer takes and returnsSelf
#537- ๐ Use
http_types::mime
instead of themime
crate #536 - - Renamed
Reponse::set_cookie
toResponse::insert_cookie
#562 - Various
Response
methods no longer returnSelf
#562 - Renamed
Response::set_header
toResponse::insert_header
#562 - Renamed
Reponse::set_ext
toResponse::insert_ext
#562
โ Removed
- โ Removed
Response::redirect
in favor oftide::Redirect
#562 - Removed
Response::{body_string, body_form, body_json, body}
in favor ofResponse::set_body
#562
๐ Fixed
- โก๏ธ Update docs from
Request::local
toRequest::ext
#539 - Creating a middleware directly from a function is now possible again #545
- ๐ Fixed wildcard tests #518
Internal
- โ Added
-
v0.9.0 Changes
May 23, 2020โก๏ธ This patch updates
http-types
to 2.0.0, removeshttp-service
in favor of
Server::respond
, and adds an all-newRedirect
struct.http-types 2.0
๐ Read the http-types changelog for a full rundown of changes. But the biggest change for Tide is that working with headers in Tide is becoming a lot easier. To see all the changes in action, compare what it was like to compare a header with how it is now:
// http-types 1.xassert\_eq!(req.header(&"X-Forwarded-For".parse().unwrap()), Some(&vec!["127.0.0.1".parse().unwrap()]));// http-types 2.xassert\_eq!(req.header["X-Forwarded-For"], "127.0.0.1");
Constructing headers from string literals, comparing to string literals,
using[]
to access by name โ this should make it much easier to work with
Tide!Server::respond
http-service
has been a tricky one. It originally served as a simplified wrapper aroundhyperium/hyper
with a streamingBody
type with the potential to abstract to other backends as well. But as we've evolved Tide and the http-rs ecosystem, we foundhttp-service
becoming more a hurdle than a help.โ In this patch we're removing
http-service
from Tide and introducingServer::respond
as its replacement. This not only makes Tide easier to maintain, it makes it easier to use with any other backend than ever before. It also provides convenient way to unit test Tide apps as well:use tide::http::{self, Url, Method}; #[async\_std::test]async fn hello\_world() -\> tide::Result\<()\> { let mut app = tide::new(); app.at("/").get(|\_| async move { Ok("hello world")} ); let req = http::Request(Method::Get, Url::parse("http://computer.soup")?); let res = app.respond(req).await?; assert\_eq!(res.body\_string().await?, "hello world".to\_owned()); Ok(()) }
Redirect
In the past we introduced the
redirect
submodule which provided redirect endpoints. AndResponse::redirect*
which provided methods to create redirects inside endpoints. In this patch we're removing those APIs in favor oftide::Redirect
which can be used both to create new redirect endpoint, and be used inside existing endpoints to redirect:use tide::Redirect; #[async\_std::main]async fn main() -\> tide::Result\<()\> { let mut app = tide::new(); app.at("/fish").get(|\_| async move { Ok("yum") }); // Either create a redirect endpoint directly. app.at("/chashu").get(Redirect::new("/fish")); // Or redirect from inside an existing endpoint// enabling conditional redirects. app.at("/nori").get(|\_| async move { Redirect::new("/fish") }); app.listen("127.0.0.1:8080").await?; Ok(()) }
Big thanks to @ethanboxx for introducing this pattern to Tide. We'll be looking to introduce this pattern to more APIs in the future.
โ Added
- โ Added
Response::take_body
#499 - โ Added
Response::remove_header
#508 - โ Added
Server::respond
#503 - โ Added @tirr-c as a co-author in Cargo.toml #507
- โ Added
Response::from_res
#466 - โ Added
AsRef/AsMut
impls to bridge Tide andhttp-types
's req/res types #510 - โ Added
Into<http_types::Request>
forRequest
#510 - โ Added
Response::header
#515 - โ Added
tide::log::start
which starts a logger that pretty-prints in development and prints ndjson in release mode #495
โ Removed
- โ Removed
http-service
in favor ofServer::respond
#503 - โ Removed the
redirects
directory in favor oftide::Redirect
#513
๐ Changed
- Unified all redirect functionality into a single
Redirect
type #513 - ๐ The log middleware now logs time more accurately #517
Internal
- โ Added
-
v0.8.1 Changes
May 07, 2020๐ docs.rs
๐ This patch contains several bug fixes and doc tweaks.
โ Added
Route::serve_dir
now applies some degree of mime guessing #461- โ Added the "Tide Channels" post to the README #464
- โ Added documentation on Tide's default backend #467
๐ Changed
- โก๏ธ Updated the crate version in the README #475
๐ Fixed
-
v0.8.0 Changes
April 24, 2020๐ API Documentation
๐ This patch introduces the use of the
?
operator in Endpoints, initial support for Server-Sent Events, static file serving, and a new submodule hierarchy. This continues the integration ofhttp-types
we started in v0.7.0Fallible endpoints
Tide now allows the use of
?
in endpoints. Errors are automatically converted totide::Error
and have a status code of 500 assigned to them. Overriding status codes can be done through the use of thetide::Status
trait which is included in the prelude.use async\_std::{fs, io};use tide::{Response, StatusCode}; #[async\_std::main]async fn main() -\> io::Result\<()\> { let mut app = tide::new(); app.at("/").get(|\_| async move { let mut res = Response::new(StatusCode::Ok); res.set\_body(fs::read("my\_file").await?); Ok(res) }); app.listen("localhost:8080").await?; Ok(()) }
Server-Sent Events
๐ This release makes the first steps towards integrating channels in Tide. In this release we're introducing support for Server-Sent Events, unidirectional event streams that operate over HTTP. This can be used for implementing features such as live-reloading, or sending notifications.
use tide::sse; #[async\_std::main]async fn main() -\> Result\<(), std::io::Error\> { let mut app = tide::new(); app.at("/sse").get(sse::endpoint(|\_req, sender| async move { sender.send("fruit", "banana", None).await; sender.send("fruit", "apple", None).await; Ok(()) })); app.listen("localhost:8080").await?; Ok(()) }
๐ป Connecting to the stream can be done using
async-sse
or from the browser:var sse = new EventSource('/sse');sse.on("message", (ev) =\> console.log(ev));
In the future we may expand on these APIs to allow other endpoints to send messages on established channels, but in order to do so we need to implement session management first.
Static file serving
Tide is now able to serve static directories through the
Route::serve_dir
method. This allows mapping URLs to directories on disk:#[async\_std::main]async fn main() -\> Result\<(), std::io::Error\> { let mut app = tide::new(); app.at("/public/images").serve\_dir("images/")?; app.listen("127.0.0.1:8080").await?; Ok(()) }
Revamped Hierarchy
Tide has been changing a lot recently, and we've made changes to our submodules so we can keep up. We no longer have a singular
middleware
submodule and instead split them up by topic. This will allow us to continue to expand on Tide's capabilities, while keeping things easy to find.Future Directions
๐ The next step for us is to continue to integrate
http-types
into Tide, focusing on theRequest
,Response
, andBody
types. This will likely coincide with a[email protected]
release. After that our goal is to expand our capabilities around file serving and testing. And finally adding support for WebSockets, sessions, and TLS.We're excited for the future of Tide, and we're glad you're here with us!
โ Added
- Enabled the use of
?
inEndpoint
#438 HttpService
is now directly implemented onServer
#442- โ Added
Route::serve_dir
which can serve full directories #415 - โ Added a "getting started" section to the README #445
- โ Added
Response::redirect_permanent
#435 - โ Added
Response::redirect_temporary
#435 - โ Added the
redirect
submodule #450 - โ Added
redirect::permanent
#435 - โ Added the
log
submodule providing structured logging #451 - โ Added a test for chunked encoding #437
- โ Added a logo and favicon for rustdoc #459
- โ Added the
sse
submodule providing initial Server-Sent Events support #456 - โ Added
tide::{Body, StatusCode}
, re-exported fromhttp-types
#455 - โ Added instructions to the README how to run examples #460
- โ Added an example for a nesting tide server #429
๐ Changed
- All
Endpoint
s now returnResult<Into<Response>>
#438 - ๐ Renamed
tide::redirect
totide::redirect::temporary
#450 - 0๏ธโฃ Logging middleware is now enabled by default #451
- ๐ Moved CORS middleware to the
security
submodule #453 - ๐ Allow
tide::Result<Response>
to be abbreviated astide::Result
#457 - Replaced the use of
IntoResponse
withInto<Response>
#463
โ Removed
- โ Removed unused server impl code #441
- โ Removed the
tide::server::Service
struct #442 - โ Removed the
tide::server
submodule #442 - โ Removed the
tide::middleware
submodule #453 - โ Removed the
IntoResponse
trait #463
๐ Fixed
- Enabled the use of
-
v0.7.0 Changes
April 17, 2020๐ This patch switches Tide to use
http-types
for its interface, andasync-h1
as its default engine. Additionally we now allow middleware to be defined on a per-route basic. Put together this is effectively an overhaul of Tide's internals, and constitutes a fairly large change.๐ If you're using Tide in production please be advised this release may have a different stability profile than what you've become used to in the past, and we advice upgrading with appropriate caution. If you find any critical bugs, filing a bug report on one of the issue trackers and reaching out directly over Discord is the quickest way to reach the team.
๐ The reason we're making these changes is that it will allow us to finally polish our error handling story, severely simplify internal logic, and enable many many other features we've been wanting to implement for years now. This is a big step for the project, and we're excited to be taking it together.
โ Added
๐ Changed
- Made
Endpoint::call
generic over the lifetime #397 - โ Removed
Result
fromRequest::cookie
#413 - 0๏ธโฃ Use
async-h1
as the default engine #414 - ๐ Use
http-types
as the interface types #414
๐ Fixed
- Made