21 releases (13 breaking)

0.13.0 Jul 31, 2020
0.11.0 Jun 12, 2020
0.6.0 Jan 30, 2020
0.5.1 Dec 20, 2019
0.0.0 Aug 10, 2018

#5 in HTTP server

Download history 2474/week @ 2020-06-06 2737/week @ 2020-06-13 2285/week @ 2020-06-20 3202/week @ 2020-06-27 4827/week @ 2020-07-04 2766/week @ 2020-07-11 3232/week @ 2020-07-18 3594/week @ 2020-07-25 5043/week @ 2020-08-01 4649/week @ 2020-08-08 3491/week @ 2020-08-15 3514/week @ 2020-08-22 2980/week @ 2020-08-29 3591/week @ 2020-09-05 4274/week @ 2020-09-12 3849/week @ 2020-09-19

16,093 downloads per month
Used in 46 crates (44 directly)

MIT/Apache

165KB
3K SLoC

Tide

Serve the web

A modular web framework built around async/await

Getting started

Add two dependencies to your project's Cargo.toml file: tide itself, and async-std with the feature attributes enabled:

# Example, use the version numbers you need
tide = "0.12.0"
async-std = { version = "1.6.0", features = ["attributes"] }

Examples

Hello World

#[async_std::main]
async fn main() -> Result<(), std::io::Error> {
    tide::log::start();
    let mut app = tide::new();
    app.at("/").get(|_| async { Ok("Hello, world!") });
    app.listen("127.0.0.1:8080").await?;
    Ok(())
}

To try the included examples, check out this repository and run

$ cargo run --example # shows a list of available examples
$ cargo run --example hello

TLS termination and reverse proxies

Tide's default backend currently does not support TLS, and only supports HTTP/1.1.

To use with nginx

In order to use nginx as reverse proxy for Tide, your upstream proxy configuration must include this line:

proxy_http_version 1.1;

Resources

Read about the design here:

Contributing

Want to join us? Check out our The "Contributing" section of the guide and take a look at some of these issues:

Conduct

The Tide project adheres to the Contributor Covenant Code of Conduct. This describes the minimum behavior expected from all contributors.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~7–10MB
~187K SLoC