hunter / hayaku

Microframework inspired by Golang's net/http

commit 13d7f8b240450f6e1b3895d0e01ac888bd6516f0

author Hunter Praska

time 2018-02-10 00:46:43 -06:00

Change unreachable to panic

This is actually a user reachable state, but it's still something that
should panic.


An http library inspired by Golang's net/http.

Various example servers are included in examples/. For a more complex use case, take a look at neppit.


Place hayaku = { git="" } in your Cargo.toml.

extern crate hayaku;

use hayaku::{Http, Router, Request, Response};

use std::sync::Arc;

fn main() {
    let addr = "".parse().unwrap();
    let mut router = Router::new();
    router.get("/", Arc::new(home_handler)).unwrap();

    Http::new(router, ()).listen_and_serve(addr);

fn home_handler(_req: &mut Request, res: Response, _ctx: &()) -> Result<(), ()> {
    res.body(b"Hello, world!");


  • Testing library for applications (Hard)
  • Handle form parsing for multipart data (Hard)
  • Documentation (Hard)
  • TLS support (Hard)
  • Requests to other servers (Hard)
    • This will probably wait for the 1.0 sync http lib