sharp_pencil

Crates.iosharp_pencil
lib.rssharp_pencil
version0.6.1
sourcesrc
created_at2017-03-02 15:29:37.791138
updated_at2022-07-24 13:05:54.138188
descriptionA micro web framework for Rust. (A Pencil fork)
homepagehttps://github.com/golddranks/sharp_pencil
repositoryhttps://github.com/golddranks/sharp_pencil
max_upload_size
id8771
size677,815
Pyry Kontio (golddranks)

documentation

http://fengsp.github.io/pencil/

README

Sharp Pencil

This is a web framework in syncronous Rust, based on Hyper 0.10 and originally developed circa 2016. It's a fork of unmaintained framework Pencil. The origin of this fork can be traced to this message: https://github.com/fengsp/pencil/issues/49

Build Status Crates.io Version Crates.io LICENSE

A microframework for Rust inspired by Flask.

extern crate pencil;

use sharp_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/

If you feel anything wrong, feedbacks or pull requests are welcome.

Commit count: 243

cargo fmt