mirror of
https://github.com/zigzap/zap.git
synced 2025-10-21 07:34:08 +00:00
Merge pull request #50 from euanwm/spelling_error
spelling and grammar mods
This commit is contained in:
commit
a231371c3a
1 changed files with 13 additions and 13 deletions
26
README.md
26
README.md
|
@ -11,7 +11,7 @@ kind of REST APIs I used to write in [python](https://python.org) with
|
||||||
microframework for web applications.
|
microframework for web applications.
|
||||||
|
|
||||||
What I needed for that was a blazingly fast, robust HTTP server that I could use
|
What I needed for that was a blazingly fast, robust HTTP server that I could use
|
||||||
with zig. While facil.io supports TLS, I don't care about HTTPS support. In
|
with Zig. While facil.io supports TLS, I don't care about HTTPS support. In
|
||||||
production, I use [nginx](https://www.nginx.com) as a reverse proxy anyway.
|
production, I use [nginx](https://www.nginx.com) as a reverse proxy anyway.
|
||||||
|
|
||||||
Zap wraps and patches [facil.io - the C web application
|
Zap wraps and patches [facil.io - the C web application
|
||||||
|
@ -33,7 +33,7 @@ Exactly the goals I set out to achieve!
|
||||||
|
|
||||||
Here's what works:
|
Here's what works:
|
||||||
|
|
||||||
- **Super easy build process**: zap's `build.zig` now uses the up-and-coming zig
|
- **Super easy build process**: Zap's `build.zig` now uses the up-and-coming Zig
|
||||||
package manager for its C-dependencies, no git submodules anymore.
|
package manager for its C-dependencies, no git submodules anymore.
|
||||||
- _tested on Linux and macOS (arm, M1)_
|
- _tested on Linux and macOS (arm, M1)_
|
||||||
- **[hello](examples/hello/hello.zig)**: welcomes you with some static HTML
|
- **[hello](examples/hello/hello.zig)**: welcomes you with some static HTML
|
||||||
|
@ -102,18 +102,18 @@ projects, serving thousands of concurrent clients.
|
||||||
|
|
||||||
## ⚡blazingly fast⚡
|
## ⚡blazingly fast⚡
|
||||||
|
|
||||||
Claiming to be blazingly fast is the new black. At least, zap doesn't slow you
|
Claiming to be blazingly fast is the new black. At least, Zap doesn't slow you
|
||||||
down and if your server performs poorly, it's probably not exactly zap's fault.
|
down and if your server performs poorly, it's probably not exactly Zap's fault.
|
||||||
Zap relies on the [facil.io](https://facil.io) framework and so it can't really
|
Zap relies on the [facil.io](https://facil.io) framework and so it can't really
|
||||||
claim any performance fame for itself. In this initial implementation of zap,
|
claim any performance fame for itself. In this initial implementation of Zap,
|
||||||
I didn't care about optimizations at all.
|
I didn't care about optimizations at all.
|
||||||
|
|
||||||
But, how fast is it? Being blazingly fast is relative. When compared with a
|
But, how fast is it? Being blazingly fast is relative. When compared with a
|
||||||
simple GO HTTP server, a simple zig zap HTTP server performed really good on my
|
simple GO HTTP server, a simple Zig Zap HTTP server performed really good on my
|
||||||
machine (x86_64-linux):
|
machine (x86_64-linux):
|
||||||
|
|
||||||
- zig zap was nearly 30% faster than GO
|
- Zig Zap was nearly 30% faster than GO
|
||||||
- zig zap had over 50% more throughput than GO
|
- Zig Zap had over 50% more throughput than GO
|
||||||
|
|
||||||
**Update**: Thanks to @felipetrz, I got to test against more realistic Python
|
**Update**: Thanks to @felipetrz, I got to test against more realistic Python
|
||||||
and Rust examples. Both python `sanic` and rust `axum` were easy enough to
|
and Rust examples. Both python `sanic` and rust `axum` were easy enough to
|
||||||
|
@ -126,7 +126,7 @@ specific CPU cores.
|
||||||
|
|
||||||
**Update**: I have consolidated the benchmarks to one good representative per
|
**Update**: I have consolidated the benchmarks to one good representative per
|
||||||
language. See more details in [blazingly-fast.md](./blazingly-fast.md). It
|
language. See more details in [blazingly-fast.md](./blazingly-fast.md). It
|
||||||
contains rust implementations that come pretty close to zap's performance in the
|
contains rust implementations that come pretty close to Zap's performance in the
|
||||||
simplistic testing scenario.
|
simplistic testing scenario.
|
||||||
|
|
||||||

|

|
||||||
|
@ -214,7 +214,7 @@ dependencies to build and run the GO, python, and rust examples for the
|
||||||
`wrk` performance tests. For the mere building of zap projects,
|
`wrk` performance tests. For the mere building of zap projects,
|
||||||
`nix develop .#build` will only fetch zig 0.11.0.
|
`nix develop .#build` will only fetch zig 0.11.0.
|
||||||
|
|
||||||
With an existing zig project, adding zap to it is easy:
|
With an existing Zig project, adding Zap to it is easy:
|
||||||
|
|
||||||
1. Add zap to your `build.zig.zon`
|
1. Add zap to your `build.zig.zon`
|
||||||
2. Add zap to your `build.zig`
|
2. Add zap to your `build.zig`
|
||||||
|
@ -250,12 +250,12 @@ Then, in your `build.zig`'s `build` function, add the following before
|
||||||
exe.linkLibrary(zap.artifact("facil.io"));
|
exe.linkLibrary(zap.artifact("facil.io"));
|
||||||
```
|
```
|
||||||
|
|
||||||
From then on, you can use the zap package in your project. Check out the
|
From then on, you can use the Zap package in your project. Check out the
|
||||||
examples to see how to use zap.
|
examples to see how to use Zap.
|
||||||
|
|
||||||
## Updating your project to the latest version of zap
|
## Updating your project to the latest version of zap
|
||||||
|
|
||||||
You can change the URL to zap in your `build.zig.zon`
|
You can change the URL to Zap in your `build.zig.zon`
|
||||||
|
|
||||||
- easiest: use a tagged release
|
- easiest: use a tagged release
|
||||||
- or to one of the tagged versions, e.g. `0.0.9`
|
- or to one of the tagged versions, e.g. `0.0.9`
|
||||||
|
|
Loading…
Add table
Reference in a new issue