Skip to content

Commit e1919d4

Browse files
committed
release: 2.1.6
1 parent dd39277 commit e1919d4

File tree

5 files changed

+3542
-5909
lines changed

5 files changed

+3542
-5909
lines changed

README.md

Lines changed: 2 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# llhttp
2-
[![CI](https://github.com/nodejs/llhttp/workflows/CI/badge.svg)](https://github.com/nodejs/llhttp/actions?query=workflow%3ACI)
32

43
Port of [http_parser][0] to [llparse][1].
54

@@ -23,7 +22,7 @@ were tried. However, all of them failed due to resulting significant performance
2322
degradation.
2423

2524
This project is a port of [http_parser][0] to TypeScript. [llparse][1] is used
26-
to generate the output C source file, which could be compiled and
25+
to generate the output C and/or bitcode artifacts, which could be compiled and
2726
linked with the embedder's program (like [Node.js][7]).
2827

2928
## Performance
@@ -32,7 +31,7 @@ So far llhttp outperforms http_parser:
3231

3332
| | input size | bandwidth | reqs/sec | time |
3433
|:----------------|-----------:|-------------:|-----------:|--------:|
35-
| **llhttp** | 8192.00 mb | 1777.24 mb/s | 3583799.39 req/sec | 4.61 s |
34+
| **llhttp** _(C)_ | 8192.00 mb | 1777.24 mb/s | 3583799.39 ops/sec | 4.61 s |
3635
| **http_parser** | 8192.00 mb | 694.66 mb/s | 1406180.33 req/sec | 11.79 s |
3736

3837
llhttp is faster by approximately **156%**.
@@ -90,60 +89,9 @@ if (err == HPE_OK) {
9089
parser.reason);
9190
}
9291
```
93-
For more information on API usage, please refer to [src/native/api.h](https://github.com/nodejs/llhttp/blob/main/src/native/api.h).
94-
95-
## Build Instructions
96-
97-
Make sure you have [Node.js](https://nodejs.org/), npm and npx installed. Then under project directory run:
98-
99-
```sh
100-
npm install
101-
make
102-
```
10392
10493
---
10594
106-
### Bindings to other languages
107-
108-
* Python: [pallas/pyllhttp][8]
109-
* Ruby: [metabahn/llhttp][9]
110-
* Rust: [JackLiar/rust-llhttp][10]
111-
112-
### Using with CMake
113-
114-
If you want to use this library in a CMake project you can use the snippet below.
115-
116-
```
117-
FetchContent_Declare(llhttp
118-
URL "https://github.com/nodejs/llhttp/archive/refs/tags/v6.0.5.tar.gz") # Using version 6.0.5
119-
120-
FetchContent_MakeAvailable(llhttp)
121-
122-
target_link_libraries(${EXAMPLE_PROJECT_NAME} ${PROJECT_LIBRARIES} llhttp ${PROJECT_NAME})
123-
```
124-
125-
## Building on Windows
126-
127-
### Installation
128-
129-
* `choco install git`
130-
* `choco install node`
131-
* `choco install llvm` (or install the `C++ Clang tools for Windows` optional package from the Visual Studio 2019 installer)
132-
* `choco install make` (or if you have MinGW, it comes bundled)
133-
134-
1. Ensure that `Clang` and `make` are in your system path.
135-
2. Using Git Bash, clone the repo to your preferred location.
136-
3. Cd into the cloned directory and run `npm install`
137-
5. Run `make`
138-
6. Your `repo/build` directory should now have `libllhttp.a` and `libllhttp.so` static and dynamic libraries.
139-
7. When building your executable, you can link to these libraries. Make sure to set the build folder as an include path when building so you can reference the declarations in `repo/build/llhttp.h`.
140-
141-
### A simple example on linking with the library:
142-
143-
Assuming you have an executable `main.cpp` in your current working directory, you would run: `clang++ -Os -g3 -Wall -Wextra -Wno-unused-parameter -I/path/to/llhttp/build main.cpp /path/to/llhttp/build/libllhttp.a -o main.exe`.
144-
145-
If you are getting `unresolved external symbol` linker errors you are likely attempting to build `llhttp.c` without linking it with object files from `api.c` and `http.c`.
146-
14795
#### LICENSE
14896
14997
This software is licensed under the MIT License.
@@ -177,6 +125,3 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
177125
[5]: https://llvm.org/docs/LangRef.html#call-instruction
178126
[6]: https://clang.llvm.org/
179127
[7]: https://github.com/nodejs/node
180-
[8]: https://github.com/pallas/pyllhttp
181-
[9]: https://github.com/metabahn/llhttp
182-
[10]: https://github.com/JackLiar/rust-llhttp

0 commit comments

Comments
 (0)