Shio is a fast, simple, and asynchronous micro web-framework for Rust.
Asynchronous. Handlers are both handled asynchronously and may be asynchronous themselves. A shio::Handler
receives a tokio_core::reactor::Handle
which may be used to schedule additional work on the thread-local event loop.
Multithreaded. By default, requests are handled by multiple threads, each running an event loop powered by tokio
.
toml
[dependencies]
shio = "0.0.5"
```rust use shio::prelude::*;
fn helloworld(: Context) -> Response { Response::with("Hello World\n") }
fn main() { Shio::default().route((Method::Get, "/", hello_world)).run(":7878").unwrap(); } ```
See the ./examples for more usage information.
Licensed under either of
at your option.
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.