1
0
Fork 0
mirror of https://github.com/zigzap/zap.git synced 2025-10-20 15:14:08 +00:00

update to latest zig, udpate RM: no GH workaround

This commit is contained in:
Rene Schallner 2023-04-28 13:49:23 +02:00
parent 3f79ddf370
commit 4dc997e39f
2 changed files with 3 additions and 40 deletions

View file

@ -149,43 +149,6 @@ Then, in your `build.zig`'s `build` function, add the following before
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.
### Please note: latest zig master
Latest zig-master has problems handling the recent GitHub redirects to
`codeload.github.com`. Check if this issue still persists
[here](https://github.com/ziglang/zig/issues/15419). My work-around for this is
as follows:
Change your `build.zig.zon` zap dependency to localhost:
```zig
.{
.name = "My example project",
.version = "0.0.1",
.dependencies = .{
// zap release-0.0.11-localhost
.zap = .{
.url = "http://127.0.0.1:8000/release-0.0.11-localhost.tar.gz",
.hash = "122072531b7983335abffa3f9e66cc7f3153e4a697d3c332ed3811495eb1c75ab3f0",
}
}
}
```
```console
$ # get dependency required by zap
$ wget https://github.com/zigzap/facil.io/archive/refs/tags/zap-0.0.7.tar.gz
$ # get zap itself
$ wget https://github.com/zigzap/zap/archive/refs/tags/release-0.0.11-localhost.tar.gz
$ # start a http server on port 8000
$ python -m http.server
```
This hosts the downloaded dependencies locally on port 8000. After the first
`zig build`, you can stop the python http server with <kbd>CTRL</kbd>+<kbd>C</kbd>.
## 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`

6
flake.lock generated
View file

@ -166,11 +166,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1682165238, "lastModified": 1682641397,
"narHash": "sha256-k/ttwl+/IRIqgPGYXkUkCWqHnFiFRa+tNcWJ5MV0DdU=", "narHash": "sha256-gt/jGCv21Oju3R8t9uzq5c7l3EagYnWhKGlY+uNNtAM=",
"owner": "mitchellh", "owner": "mitchellh",
"repo": "zig-overlay", "repo": "zig-overlay",
"rev": "1c98ac5290d53f177cd01ab02965742b36e1c5e6", "rev": "9de49969d69441e2fb50ab891d6fbd0cff0f0b5c",
"type": "github" "type": "github"
}, },
"original": { "original": {