ducta 0.2.0

Experimental non-blocking HTTP server focused on explicit I/O state machines
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use ducta::{
    http::{Request, Response},
    server::Server,
};

fn main() -> std::io::Result<()> {
    println!("Starting server on 127.0.0.1:8080");

    let _ = Server::new("127.0.0.1:8080", |_req: Request| {
        Response::new(200).with_body(&b"Hello from Duca!"[..])
    })?
    .run();

    Ok(())
}