#web-framework #framework #http #server #web #request-response

pen

A micro web framework for Rust. (A different fork of a very light fork of a Pencil fork)

1 unstable release

Uses old Rust 2015

0.1.0 Oct 25, 2017

#182 in #request-response

BSD-3-Clause

66KB
1.5K SLoC

Pen (A Sharp Pen fork (A Pen fork))

Build Status Crates.io Version Crates.io LICENSE

A microframework for Rust inspired by Flask.

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

Dependencies

~13MB
~261K SLoC