1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 23:24:09 +00:00

Put notes on zig master workaround back into README.

This commit is contained in:
Rene Schallner 2023-05-16 16:06:00 +02:00
parent 6e3c980516
commit 94fe2d24c2
2 changed files with 15 additions and 7 deletions

View file

@ -122,13 +122,18 @@ $ mkdir zaptest && cd zaptest
$ zig init-exe
$ git init ## (optional)
```
**Note 1**: Zap is developed with zig master (0.11.0-dev.2985+3f3b1a680 at the
**Note 1**: Zap is developed with zig master (0.11.0-dev.3132+465272921 at the
time of writing). This version of zig has the package management features in
place that are used in the following instructions. Nix users are lucky; you can
use the existing `flake.nix` and run `nix develop` to get a development shell
providing zig, and also all dependencies to build the and run the GO, python,
and rust examples for the `wrk` performance tests.
**Note 2**: Current ZIG master has a nasty TLS bug which prevents it from
downloading from GitHub. See the release notes of
[release-0.0.20-localhost](https://github.com/zigzap/zap/releases/tag/release-0.0.20-localhost)
for a workaround.
With an existing zig project, adding zap to it is easy:
1. Add zap to your `build.zig.zon`
@ -142,15 +147,18 @@ To add zap to `build.zig.zon`:
.version = "0.0.1",
.dependencies = .{
// zap release-0.0.19
// zap release-0.0.20
.zap = .{
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.19.tar.gz",
.hash = "1220e8618ae2240e22e1e01c3f5f8c95f70291cd5ca98c92bdfb86b01e81a9d0314b",
.url = "https://github.com/zigzap/zap/archive/refs/tags/release-0.0.20.tar.gz",
.hash = "12200772b594bc50bbdc18b14aa3c7461991a33179f9c254de05eb34d214662971da",
}
}
}
```
**!!!PLEASE NOTE!!!** Current ZIG master has a bug in fetching archives from GitHub.
Please see the release notes of [release-0.0.20-localhost](https://github.com/zigzap/zap/releases/tag/release-0.0.20-localhost) for a workaround.
Then, in your `build.zig`'s `build` function, add the following before
`b.installArtifact(exe)``:

6
flake.lock generated
View file

@ -166,11 +166,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1683461227,
"narHash": "sha256-IhHbNNK+XeiKEvsdnMTiFw99ck2Iwdrt2gCbWXrmlRc=",
"lastModified": 1684066016,
"narHash": "sha256-yruKXIwISE+cuu1rz6vK49BYK3B9fiOJ888tnf1FywI=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "6ab09a96babc526ba9743ebab3f7863d140a73a5",
"rev": "0ffd6ed7472e5fa79589c6bd7b8e1b8e290289ef",
"type": "github"
},
"original": {