2 releases

Uses old Rust 2015

0.4.4 Nov 8, 2017
0.4.3 Oct 20, 2017

#933 in HTTP server

BSD-3-Clause

66KB
1.5K SLoC

light_pencil (A Sharp Pencil fork (A Pencil fork))

Build Status Crates.io Version Crates.io LICENSE

A microframework for Rust inspired by Flask.

extern crate light_pencil;
use light_pencil::{Pencil, Request, Response, PencilResult};
fn hello(_: &mut Request) -> PencilResult {
    Ok(Response::from("Hello World!"))
}
fn main() {
    let mut app = Pencil::new("/web/hello");
    app.get("/", "hello", hello);
    app.run("127.0.0.1:5000");
}

One simple guide: https://fengsp.github.io/blog/2016/3/introducing-pencil/ Documentation: https://fengsp.github.io/pencil/pencil/

Dependencies

~13MB
~264K SLoC