#web #framework #server #http

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

#221 in #server

BSD-3-Clause

65KB
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

~12MB
~255K SLoC