18 releases (4 breaking)

0.5.3 Dec 26, 2018
0.5.2 Dec 25, 2018
0.4.3 Nov 30, 2018
0.3.2 Oct 24, 2018
0.1.4 Jun 16, 2018

#81 in #hyper

Download history 22/week @ 2021-01-13 3/week @ 2021-01-20 2/week @ 2021-01-27 2/week @ 2021-02-03 58/week @ 2021-02-10 58/week @ 2021-02-17 4/week @ 2021-02-24 5/week @ 2021-03-03 2/week @ 2021-03-10 1/week @ 2021-03-17 65/week @ 2021-03-24 39/week @ 2021-03-31 21/week @ 2021-04-07 24/week @ 2021-04-14 47/week @ 2021-04-21 21/week @ 2021-04-28

66 downloads per month
Used in less than 6 crates

MIT/Apache

230KB
7K SLoC

header

Asynchronous Web framework for Rust.


Crates.io Minimal Rust Version: 1.31.0 Build Status Coverage Status Gitter

Features

  • Type-safe and composable handlers based on Extractor system
  • Scoped routing and middlewares
  • Asynchronous HTTP server based on tokio, hyper and tower-service

Usage

use {
    std::net::SocketAddr,
    tsukuyomi::{
        App,
        config::prelude::*,
    },
    tsukuyomi_server::Server,
};

fn main() -> tsukuyomi_server::Result<()> {
    let app = App::create(
        path!("/")
            .to(endpoint::reply("Hello, world.\n"))
    )?;

    let addr = SocketAddr::from(([127, 0, 0, 1], 4000));
    println!("Listening on http://{}", addr);

    Server::new(app).bind(addr).run()
}

Resources

Extensions

License

Tsukuyomi is licensed under either of MIT license or Apache License, Version 2.0 at your option.

Dependencies

~8MB
~184K SLoC