All Versions
Latest Version
Avg Release Cycle
32 days
Latest Release
1317 days ago

Changelog History
Page 1

  • v0.15.0 Changes

    November 13, 2020

    This patch adds Server::bind, SessionMiddleware::with_cookie_domain, and a new optional cookies feature.


    Tide v0.15.0 introduces a new way to start servers: Server::bind. This enables separatining "open the socket" from "start accepting connections" which Server::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 of Listener which is able to return information on all ports that are being listened on. By default Server::listen logs these out, but when manually calling Server::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 integrate tide-rustls into tide, 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();"/").get(|\_| async { Ok("Hello, world!") });let mut listener = app.bind("").await?;for info in { println!("Server listening on {}", info); } listener.accept().await?;


    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("") .with\_cookie\_path("/some/path") .with\_cookie\_domain("") // 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 for http-types here.

    ➕ Added

    • ➕ Add Server::bind #740
    • Add with_cookie_domain method to SessionMiddleware #730
    • ➕ Add an optional cookies feature #717

    🛠 Fixed

    • 🛠 Fix param documentation #737
    • 🛠 Fix port in README #732


  • 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 for Box<dyn Endpoint> #710
    • ➕ Add a http_client::HttpClient implementation for tide::Server #697
    • Introduce a logger feature to optionally disable the femme 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


    • ⬆️ 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 #672
    • ➕ Add community resources to readme instead of wiki #668
  • 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.


    👍 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

    🏗 Tide sessions are generic over backend stores and signing strategy. It builds
    🚀 on the newly released async-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 and cookie store by default. However we have
    also published several convenient session store implementations for common
    databases, providing a nice selection to choose from:

    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://")?; let secret = std::env::var("SESSION\_SECRET").unwrap(); app.with(SessionMiddleware::new(store,\_bytes()));"/").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"/reset").get(|mut req: Request\<()\>| async move { req.session\_mut().destroy(); Ok(Redirect::new("/")) }); // Start the server app.listen("").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 to Server::with in order to
    streamline much of the middleware APIs.

    // After this patchlet mut app = tide::new(); app.with(MyMiddleware::new());"/").get(|\_| async move { Ok("hello chashu") }); app.listen("localhost:8080").await?;// Before this patchlet mut app = tide::new(); app.middleware(MyMiddleware::new());"/").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

    1. 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

    🚀 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

    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 to Server::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


    • ✅ Enable clippy for tests #655
    • Reorder deps in cargo.toml #658
  • 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 new ResponseBuilder type, State must now be Clone, and we
    are introducing an extensible API for Server::listen.


    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 introducing tide::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:"/").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 new Listener trait that is
    implemented for std types such as TcpStream, SocketAddr and
    UnixStream. But can also be implemented by users of Tide to provide custom

    👍 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. With ConcurrentListener 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 an Arc multiple
    times. In this patch we're solving that by providing people with more control
    👯 around how State is shared by requiring State to implement Clone.

    👯 In most existing applications State can be made Clone by manually
    wrapping it in an Arc::new. But it's also possible to wrap individual
    👯 fields in an Arc 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 author Middleware implementations. For convenience Tide re-exports as tide::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 the Err variant could freely be
    thrown up the middleware stack, and transformed into a Response at the top
    of the stack. However in practice this didn't turn out great: middleware such
    as CORS needed to manipulate the Err 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
    convert Result<Response, tide::Error> into a Response, and if an error
    occurred, we populate the newly introduced Response::error field.

    This means that middleware can always assume there is a valid Response
    coming through, and no longer needs to check both Ok and Err branch
    returned by next().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 returns Response instead of Result<Response> #570
    • 📇 Rename tide::middleware to tide::utils #567
    • 👯 Require State to be Clone #644

    🛠 Fixed

    • 👉 Make ServeDir return 404 if file does not exists #637
    • 👉 Remove #[must_use] for Response::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


    • ✂ Remove executable mode from #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 moves from route handlers #581
  • 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

    • ➕ Added Request::set_body #579
    • ➕ Added impl From<Body> for Response #584

    🔄 Changed

    • Response::set_status no longer takes and returns self #572

    🛠 Fixes

    • 🛠 Fixed an issue with unwrap in SSE #588
    • 🛠 Fixed an unwrap issue in Endpoint #590


    • ✂ Delete the unmaintained file #565
    • 📇 Renamed cx to req #582
    • 🛠 Fix failing dependency on CI #589
    • 👉 Use tide::Response interface in the sse endpoint #583
    • ✂ Remove unnecessary moves from route examples #581
  • v0.10.0 Changes

    June 05, 2020

    📄 Docs

    This release updates tide's Request and Response types to match http_types's Request and Response, a new Server::listen_unix method to listen on Unix Domain Sockets, and the ability to return json! 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 to Middleware #545
    • ➕ Added AsRef/AsMut<Headers> for Request/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 accepts u16 as well as StatusCode as arguments #562
    • ➕ Added a new convert submodule which holds various conversion-related types, including serde #564

    🔄 Changed

    • 📇 Renamed Request::uri to Request::url#537
    • Request::body_bytes now returns tide::Result #537
    • Request::body_string now returns tide::Result #537
    • Request::body_json now returns tide::Result #537
    • Request::body_form now returns tide::Result #537
    • Request::set_ext no longer takes and returns Self #537
    • 👉 Use http_types::mime instead of the mime crate #536 -
    • Renamed Reponse::set_cookie to Response::insert_cookie #562
    • Various Response methods no longer return Self #562
    • Renamed Response::set_header to Response::insert_header #562
    • Renamed Reponse::set_ext to Response::insert_ext #562

    ✂ Removed

    • ✂ Removed Response::redirect in favor of tide::Redirect #562
    • Removed Response::{body_string, body_form, body_json, body} in favor of Response::set_body #562

    🛠 Fixed

    • ⚡️ Update docs from Request::local to Request::ext #539
    • Creating a middleware directly from a function is now possible again #545
    • 🛠 Fixed wildcard tests #518


    • 🛠 Fix unix tests #552
    • ⚡️ Update http-types to 2.0.1 #537
    • ⚡️ Update async-sse to v3.0.0 #559
    • 👉 Use query from http_types #555
    • 🛠 Fix tests on master #560
    • ✂ Remove unused serde_qs dependency #569
    • ✅ Uncomment and fix response tests #516
  • v0.9.0 Changes

    May 23, 2020

    ⚡️ This patch updates http-types to 2.0.0, removes http-service in favor of
    Server::respond, and adds an all-new Redirect 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!["".parse().unwrap()]));// http-types 2.xassert\_eq!(req.header["X-Forwarded-For"], "");

    Constructing headers from string literals, comparing to string literals,
    using [] to access by name — this should make it much easier to work with


    http-service has been a tricky one. It originally served as a simplified wrapper around hyperium/hyper with a streaming Body type with the potential to abstract to other backends as well. But as we've evolved Tide and the http-rs ecosystem, we found http-service becoming more a hurdle than a help.

    ✅ In this patch we're removing http-service from Tide and introducing Server::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();"/").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(()) }


    In the past we introduced the redirect submodule which provided redirect endpoints. And Response::redirect* which provided methods to create redirects inside endpoints. In this patch we're removing those APIs in favor of tide::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();"/fish").get(|\_| async move { Ok("yum") }); // Either create a redirect endpoint directly."/chashu").get(Redirect::new("/fish")); // Or redirect from inside an existing endpoint// enabling conditional redirects."/nori").get(|\_| async move { Redirect::new("/fish") }); app.listen("").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 and http-types's req/res types #510
    • ➕ Added Into<http_types::Request> for Request #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 of Server::respond #503
    • ✂ Removed the redirects directory in favor of tide::Redirect #513

    🔄 Changed

    • Unified all redirect functionality into a single Redirect type #513
    • 🔊 The log middleware now logs time more accurately #517


    • Apply clippy #526
    • ⬆️ Bump version number in README #489
    • 🔄 Changed file structure to match external exports #502
    • ✂ Remove unused dependencies #506
    • ➕ Added a no-dev-deps check to CI #512
    • Fibonnacci example now uses Instant::elapsed #522
  • v0.8.1 Changes

    May 07, 2020


    🛠 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

    • Check directory traversal attack without file system visit #473
    • 📜 Correctly parse multiple values from the Cookie header #484
  • 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 of http-types we started in v0.7.0

    Fallible endpoints

    Tide now allows the use of ? in endpoints. Errors are automatically converted to tide::Error and have a status code of 500 assigned to them. Overriding status codes can be done through the use of the tide::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();"/").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();"/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();"/public/images").serve\_dir("images/")?; app.listen("").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.

    Screenshot_2020-04-24 tide - Rust

    Future Directions

    🚀 The next step for us is to continue to integrate http-types into Tide, focusing on the Request, Response, and Body 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 ? in Endpoint #438
    • HttpService is now directly implemented on Server #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 from http-types #455
    • ➕ Added instructions to the README how to run examples #460
    • ➕ Added an example for a nesting tide server #429

    🔄 Changed

    • All Endpoints now return Result<Into<Response>> #438
    • 📇 Renamed tide::redirect to tide::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 as tide::Result #457
    • Replaced the use of IntoResponse with Into<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

    • 🛠 Fixed CORS behavior if there is no origin header #439
    • 🛠 Fixed documentation formatting in #454
    • 🛠 Fixed a stability issue in our tests regarding by opening random ports #446
  • v0.7.0 Changes

    April 17, 2020

    📄 This patch switches Tide to use http-types for its interface, and async-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

    • Enables per-route middleware #399
    • ➕ Added an example for chunked encoding #430

    🔄 Changed

    • Made Endpoint::call generic over the lifetime #397
    • ✂ Removed Result from Request::cookie #413
    • 0️⃣ Use async-h1 as the default engine #414
    • 👉 Use http-types as the interface types #414

    🛠 Fixed

    • 🛠 Fixed a path on the #395
    • ✂ Removed unnecessary internal pin-project call #410