14 releases (8 stable)
1.0.7 | Oct 15, 2020 |
---|---|
1.0.2 | Aug 29, 2020 |
0.1.6 | Aug 24, 2020 |
#2202 in Web programming
36 downloads per month
26KB
792 lines
Swish
This Is The Beef Web Flamework For R**ket🥩 Swish Swish Bish🎶 Another One In The Basket🏀
extern crate swish_swish;
use swish_swish::*;
fn swish_swish() -> Swish {
let mut swish = Swish::new();
swish.get("/path", path_handler);
swish.get("/user/:id", user_id_handler);
swish.post("/user/register", user_register_handler);
swish.set_cors_as(allow_everything());
swish
}
fn main() {
swish_swish().bish();
}
Full Demo Application Is Here🎱
Abstract
Three rules🔔
There are three rules when making this web flamework.
- Don't be complicated
- Don't implement extra function
- Don't depend with nightly module
What I want to say🏴☠️
Sometime other Rust web flameworks can't be built when it's compiled for production because of dependencies with nightly modules
. Do we need to be an OSS committer? And we also don't prefer to use left-pad packages. R**ket is about as useful as an old coupon expired! I'd like to say We are programmer not OSS committer nor fucking copy paster!
Installation
[dependencies]
swish_swish = "1.0.7"
Dependencies Except Std
I count the crime I committed. Karma‘s not a liar!
- regex
- serde
- serde_json
Roadmap
- Basic Test Server
- Client For Test
- Route Register
- Handler And Route Matcher
- Static Route Matcher
- Dynamic Route Matcher
- Design Request And Response Struct
- Design Error Responser
- Dynamic Route Param Getter
- Actual Http Compiler
- Actual Http Responser
- Handler Returns Only Body With Chosing Content Type
- Support Post Request
- Return Basic Header Like Content Lenght
- Cros Options
- Http Request Validater
- Version
0.1.0
Release - Integration Test
- Anti Pattern Test
- Integrate Cors, Config And Request, Header
- Refactoring According To Here
- Version
1.0.0
Release - Get Method And Path From Attribute
- Define All Method And Status Code
Test
$ cargo test
Dependencies
~2.8–4.5MB
~87K SLoC