1
- # async-h1
2
- [ ![ crates.io version] [ 1 ]] [ 2 ] [ ![ build status] [ 3 ]] [ 4 ]
3
- [ ![ downloads] [ 5 ]] [ 6 ] [ ![ docs.rs docs] [ 7 ]] [ 8 ]
4
-
5
- Asynchronous HTTP 1.1 parser.
6
-
7
- - [ Documentation] [ 8 ]
8
- - [ Crates.io] [ 2 ]
9
- - [ Releases] [ releases ]
10
-
11
- ## Examples
12
- ``` rust
13
- // tbi
14
- ```
1
+ <h1 align =" center " >async-h1</h1 >
2
+ <div align =" center " >
3
+ <strong >
4
+ Asynchronous HTTP/1.1 parser.
5
+ </strong >
6
+ </div >
7
+
8
+ <br />
9
+
10
+ <div align =" center " >
11
+ <!-- Crates version -->
12
+ <a href =" https://crates.io/crates/async-h1 " >
13
+ <img src="https://img.shields.io/crates/v/async-h1.svg?style=flat-square"
14
+ alt="Crates.io version" />
15
+ </a >
16
+ <!-- Downloads -->
17
+ <a href =" https://crates.io/crates/async-h1 " >
18
+ <img src="https://img.shields.io/crates/d/async-h1.svg?style=flat-square"
19
+ alt="Download" />
20
+ </a >
21
+ <!-- docs.rs docs -->
22
+ <a href =" https://docs.rs/async-h1 " >
23
+ <img src="https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square"
24
+ alt="docs.rs docs" />
25
+ </a >
26
+ </div >
27
+
28
+ <div align =" center " >
29
+ <h3 >
30
+ <a href="https://docs.rs/async-h1">
31
+ API Docs
32
+ </a>
33
+ <span> | </span>
34
+ <a href="https://github.com/http-rs/async-h1/releases">
35
+ Releases
36
+ </a>
37
+ <span> | </span>
38
+ <a href="https://github.com/http-rs/async-h1/blob/master.github/CONTRIBUTING.md">
39
+ Contributing
40
+ </a>
41
+ </h3 >
42
+ </div >
15
43
16
44
## Installation
17
45
``` sh
18
46
$ cargo add async-h1
19
47
```
20
48
21
- ## Profiling
22
- __ build server__
23
- ``` sh
24
- $ cargo build --examples server --release
25
- ```
26
-
27
- __ profile script__
28
- ``` sh
29
- #! /bin/bash
30
- set -x
31
- perf record -F 997 -g " ./target/release/examples/server"
32
- perf script > /tmp/out.perf
33
- stackcollapse-perf /tmp/out.perf > /tmp/out.folded
34
-
35
- outfile=" /tmp/$( date +%F-%T) -flamegraph.svg"
36
- flamegraph /tmp/out.folded > " $outfile "
37
- # rm perf.data /tmp/out.perf /tmp/out.folded
38
-
39
- firefox " $outfile "
40
- ```
41
-
42
- __ load testing__
43
- Using [ autocannon] ( https://github.com/mcollina/autocannon ) do:
44
-
45
- ``` rust
46
- $ autocannon localhost : 8080 - l
47
- ```
48
-
49
49
## Safety
50
50
This crate uses `` #![deny(unsafe_code)] `` to ensure everything is implemented in
51
51
100% Safe Rust.
@@ -57,23 +57,21 @@ look at some of these issues:
57
57
- [ Issues labeled "good first issue"] [ good-first-issue ]
58
58
- [ Issues labeled "help wanted"] [ help-wanted ]
59
59
60
- ## Acknowledgements
61
- This crate wouldn't have been possible without the excellent work done in
62
- [ hyper ] ( https://github.com/hyperium/hyper/blob/b342c38f08972fe8be4ef9844e30f1e7a121bbc4/src/proto/ h1/role.rs )
60
+ [ contributing ] : https://github.com/http-rs/async-h1/blob/master.github/CONTRIBUTING.md
61
+ [ good-first-issue ] : https://github.com/http-rs/async-h1/labels/good%20first%20issue
62
+ [ help-wanted ] : https://github.com/http-rs/async- h1/labels/help%20wanted
63
63
64
64
## License
65
- [ MIT] ( ./LICENSE-MIT ) OR [ Apache-2.0] ( ./LICENSE-APACHE )
66
65
67
- [ 1 ] : https://img.shields.io/crates/v/async-h1.svg?style=flat-square
68
- [ 2 ] : https://crates.io/crates/async-h1
69
- [ 3 ] : https://img.shields.io/travis/rustasync/async-h1/master.svg?style=flat-square
70
- [ 4 ] : https://travis-ci.org/rustasync/async-h1
71
- [ 5 ] : https://img.shields.io/crates/d/async-h1.svg?style=flat-square
72
- [ 6 ] : https://crates.io/crates/async-h1
73
- [ 7 ] : https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square
74
- [ 8 ] : https://docs.rs/async-h1
66
+ <sup >
67
+ Licensed under either of <a href =" LICENSE-APACHE " >Apache License, Version
68
+ 2.0</a > or <a href =" LICENSE-MIT " >MIT license</a > at your option.
69
+ </sup >
70
+
71
+ <br />
75
72
76
- [ releases ] : https://github.com/rustasync/async-h1/releases
77
- [ contributing ] : https://github.com/rustasync/async-h1/blob/master.github/CONTRIBUTING.md
78
- [ good-first-issue ] : https://github.com/rustasync/async-h1/labels/good%20first%20issue
79
- [ help-wanted ] : https://github.com/rustasync/async-h1/labels/help%20wanted
73
+ <sub >
74
+ Unless you explicitly state otherwise, any contribution intentionally submitted
75
+ for inclusion in this crate by you, as defined in the Apache-2.0 license, shall
76
+ be dual licensed as above, without any additional terms or conditions.
77
+ </sub >
0 commit comments