Skip to content

Commit 4e7d93d

Browse files
break change: support zig 0.14.0 (#86)
* fix: zig master dev * update ci and dependency * docs: update readme * do not fail on missing examples (when used as zig package) --------- Co-authored-by: Tobias Simetsreiter <[email protected]>
1 parent 11575cb commit 4e7d93d

File tree

4 files changed

+19
-8
lines changed

4 files changed

+19
-8
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
matrix:
2121
os: [ubuntu-latest, macos-latest, windows-latest]
22-
version: [0.12.0, 0.13.0, ""]
22+
version: [0.14.0, ""]
2323
fail-fast: false
2424
runs-on: ${{ matrix.os }}
2525
steps:

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ Like `zig build run_minimal`, this will build and run the `minimal` example.
4747

4848
## Installation
4949

50-
### Zig `0.12` \ `0.13.0` \ `nightly`
50+
> note: for `0.13.0` and previous version, please use tag `2.5.0-beta.2`
51+
52+
### Zig `0.14.0` \ `nightly`
5153

5254
> To be honest, I don’t recommend using the nightly version because the API of the build system is not yet stable, which means that there may be problems with not being able to build after nightly is updated.
5355

build.zig

+8-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub fn build(b: *Build) !void {
3939
}
4040
}
4141

42-
// create a options for command paramter
42+
// create a options for command parameter
4343
const flags_options = b.addOptions();
4444

4545
// add option
@@ -110,7 +110,13 @@ fn build_examples(b: *Build, optimize: OptimizeMode, target: Build.ResolvedTarge
110110

111111
const examples_path = lazy_path.getPath(b);
112112

113-
var iter_dir = try std.fs.openDirAbsolute(examples_path, .{ .iterate = true });
113+
var iter_dir = std.fs.openDirAbsolute(examples_path, .{ .iterate = true })
114+
catch |err| {
115+
switch (err) {
116+
error.FileNotFound => return,
117+
else => return err,
118+
}
119+
};
114120
defer iter_dir.close();
115121

116122
var itera = iter_dir.iterate();

build.zig.zon

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
.{
2-
.name = "zig-webui",
2+
.name = .zig_webui,
33
.version = "0.0.1",
44
.minimum_zig_version = "0.12.0",
5+
.fingerprint = 0x95965ed3cdfb8c33,
56
.dependencies = .{
67
.webui = .{
7-
.url = "https://github.com/webui-dev/webui/archive/c512af1e6c0fe62bdf458e00fefa456ce11a6cee.tar.gz",
8-
.hash = "1220100d77f4adf277ccc7d472952ed8ebef2e766c1225f3fbc56901bf4942e3c4dd",
8+
.url = "https://github.com/webui-dev/webui/archive/5d497e3b839a93736be82107b333b4c0390dea2d.tar.gz",
9+
.hash = "webui-2.5.0-beta.3-pxqD5WZmNgCLmrqQW0U_NI4iq-z706dyreyXr-e7kFmZ",
910
},
1011
},
1112
.paths = .{
12-
"",
13+
"build.zig",
14+
"build.zig.zon",
15+
"src",
1316
},
1417
}

0 commit comments

Comments
 (0)