tsukuyomi

Crates.iotsukuyomi
lib.rstsukuyomi
version0.5.3
sourcesrc
created_at2018-06-12 13:33:01.436556
updated_at2018-12-26 15:46:06.569307
descriptionAsynchronous Web framework for Rust
homepage
repositoryhttps://github.com/tsukuyomi-rs/tsukuyomi.git
max_upload_size
id69761
size247,899
Yusuke Sasaki (ubnt-intrepid)

documentation

README

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.

Commit count: 870

cargo fmt