Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
renerocksai authored Jan 7, 2024
1 parent 689da4a commit 57370b4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Exactly the goals I set out to achieve!
## Most FAQ:

- Q: **Zap doesn't build with Zig master?**
- A: See the 0.12.0 branch. An example on how to use it is
- A: See the 0.12.0 branch. An example of how to use it is
[here](https://github.com/zigzap/hello-0.12.0). Please note that the 0.12.0
branch is not the official master branch of ZAP. Yet. Until zig 0.12.0 is
released.
Expand All @@ -41,23 +41,24 @@ Exactly the goals I set out to achieve!
- Q: **Does ZAP support TLS / HTTPS?**
- A: Yes, ZAP supports using the system's openssl. See the
[https](./examples/https/https.zig) example and make sure to build with
the -Dopenssl flag or the environment variable `ZAP_USE_OPENSSL=true`:
- `.openssl = true,` (in build.zig, `b.dependency("zap" .{...})`)
the `-Dopenssl` flag or the environment variable `ZAP_USE_OPENSSL=true`:
- `.openssl = true,` (in dependent projects' build.zig, `b.dependency("zap" .{...})`)
- `ZAP_USE_OPENSSL=true zig build https`
- `zig build -Dopenssl=true https`

## Here's what works

I recommend checking out **Endpoint-based examples for more realistic
use-cases**. Most of examples are super-stripped-down to only include what's
necessary to show a feature.
use cases**. Most of the examples are super stripped down to only include
what's necessary to show a feature.

- **Super easy build process**: Zap's `build.zig` now uses the new Zig package
manager for its C-dependencies, no git submodules anymore.
- _tested on Linux and macOS (arm, M1)_
- **[hello](examples/hello/hello.zig)**: welcomes you with some static HTML
- **[routes](examples/routes/routes.zig)**: a super easy example dispatching on
the HTTP path. **NOTE**: The dispatch in the example is a super-basic
DIY-style dispatch. See endpoint-based examples for more realistic use-cases.
DIY-style dispatch. See endpoint-based examples for more realistic use cases.
- **[serve](examples/serve/serve.zig)**: the traditional static web server with
optional dynamic request handling
- **[sendfile](examples/sendfile/sendfile.zig)**: simple example of how to send
Expand Down

0 comments on commit 57370b4

Please sign in to comment.