Saphir

doc crate issue Build Status downloads license dependency status

Saphir is a fully async-await http server framework for rust

The goal is to give low-level control to your web stack (as hyper does) without the time consuming task of doing everything from scratch.

Quick server setup

```rust use saphir::prelude::*;

async fn testhandler(mut req: Request) -> (u16, Option) { (200, req.capturesmut().remove("variable")) }

[tokio::main]

async fn main() -> Result<(), SaphirError> { env_logger::init();

let server = Server::builder()
    .configure_listener(|l| {
        l.interface("127.0.0.1:3000")
    })
    .configure_router(|r| {
        r.route("/{variable}/print", Method::GET, test_handler)
    })
    .build().await?;

server.run().await

} ```