Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fengsp/pencil
A web application microframework for Rust
https://github.com/fengsp/pencil
Last synced: 5 days ago
JSON representation
A web application microframework for Rust
- Host: GitHub
- URL: https://github.com/fengsp/pencil
- Owner: fengsp
- License: other
- Created: 2014-11-03T09:37:48.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-04-30T10:42:49.000Z (over 7 years ago)
- Last Synced: 2024-12-15T13:02:31.401Z (12 days ago)
- Language: Rust
- Homepage: https://fengsp.github.io/pencil/
- Size: 5.89 MB
- Stars: 869
- Watchers: 26
- Forks: 39
- Open Issues: 33
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES
- License: LICENSE
Awesome Lists containing this project
README
#Pencil
[![Build Status](https://travis-ci.org/fengsp/pencil.svg?branch=master)](https://travis-ci.org/fengsp/pencil) [![Crates.io Version](https://img.shields.io/crates/v/pencil.svg)](https://crates.io/crates/pencil/) [![Crates.io LICENSE](https://img.shields.io/crates/l/pencil.svg)](https://crates.io/crates/pencil/)
A microframework for Rust inspired by Flask.
```rust
extern crate pencil;use 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.