hunter / hayaku

Microframework inspired by Golang's net/http

commit f9699de45bc9e8ad781d9063ec929648a77213ad

author Hunter Praska

time 2018-08-04 17:10:53 -05:00

Default to num_cpus event loops


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