From 5a284fc96d4434f0d3ec9a870cfb5cb98a17d751 Mon Sep 17 00:00:00 2001 From: Rene Schallner <30892199+renerocksai@users.noreply.github.com> Date: Sun, 7 Jan 2024 21:12:01 +0100 Subject: [PATCH] Update README.md --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d9f3841..f4ea32f 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,11 @@ 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 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. - Q: **Does ZAP work on Windows?** - A: No. This is due to the underlying facil.io C library. Future versions of facil.io might support Windows but there is no timeline yet. Your best options @@ -35,17 +40,18 @@ 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` - Q: **Are there API docs?** - A: They are under development. Git clone this, then run `zig build run-docserver`. ## 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. **NOTE: To see API docs, run `zig build run-docserver`.** To specify a custom port and docs dir: `zig build docserver && zig-out/bin/docserver --port=8989 @@ -57,7 +63,7 @@ port and docs dir: `zig build docserver && zig-out/bin/docserver --port=8989 - **[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