![logo]

doc crate issue Rust 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 Overview

```rust use saphir::prelude::*; struct TestController {}

[controller]

impl TestController { #[get("/{var}/print")] async fn printtest(&self, var: String) -> (u16, String) { (200, var) } } async fn testhandler(mut req: Request) -> (u16, Option) { (200, req.captures_mut().remove("variable")) }

[tokio::main]

async fn main() -> Result<(), SaphirError> { envlogger::init(); let server = Server::builder() .configurelistener(|l| { l.interface("127.0.0.1:3000") }) .configurerouter(|r| { r.route("/{variable}/print", Method::GET, testhandler) .controller(TestController {}) }) .build();

server.run().await

} ```