zap
:zap:
The mission of zap
is, to deliver a basic, but fast rust web framework.
About
This code is based on tokio's minihttp project, so a big thanks to them. (source)
How to use
Add the following to your Cargo.toml
:
[]
= "0.0.4"
Speed
So zap
is not only fast, it is wapping 2.96 times faster than iron, which is based on hyper. Benchmarks below:
Benchmark Code
Iron
This code had been taken from the ironframework.io webpage.
extern crate iron;
use *;
use status;
Zap
This example can be run, by:
$ git clone https://github.com/oldaniel/zap && cd zap
$ cargo run --example hello-world --release
extern crate zap;
use Error as ZapError;
use *;
;
Benchmark Results
The benchmark results have been computed with this command: wrk -t16 -c500 -d10s http://127.0.0.1:8080 --latency
Technical details about the server:
- Intel Core I7-6700K, hyper-threaded
- 16GB RAM, 2400MHZ
Detailed results: in the wiki.
Iron
[...]
Requests/sec: 307581.17
Transfer/sec: 33.44MB
Zap
[...]
Requests/sec: 912832.31
Transfer/sec: 40.90MB
Todo
Some things we still need to make:
- Make it faster
- URL and body parsing
- Request key storing
Credits & License
A project by Daniel Oltmanns. Other amazing contributors here.