Skip to content

Commit

Permalink
Updated for zig 0.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ringtailsoftware committed Jan 2, 2025
1 parent 46613ed commit 057bef5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Zig
uses: mlugg/setup-zig@v1
with:
version: 0.13.0
version: master
- name: Build test
run: zig build test
working-directory: zoridor
Expand Down
4 changes: 2 additions & 2 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
// internet connectivity.
.dependencies = .{
.mibu = .{
.url = "git+https://github.com/xyaman/mibu.git#5cbda43f41f4d1f2769dd32523d8c1b474a4c60f",
.hash = "12205e93ed17ab3081a9d5289c2665e67873501f069a6210e02f3d8178a0c6e3156a",
.url = "git+https://github.com/xyaman/mibu.git#b001662c929e2719ee24be585a3120640f946337",
.hash = "1220d78664322b50e31a99cfb004b6fa60c43098d95abf7ec60a21ebeaf1c914edaf",
},
.yazap = .{
.url = "git+https://github.com/prajwalch/yazap#c2e3122d5dd6192513ba590f229dbc535110efb8",
Expand Down
4 changes: 2 additions & 2 deletions src/uiagentmachine.zig
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ pub const UiAgentMachine = struct {
if (!randInited) {
randInited = true;
if (config.RANDOMSEED) |seed| {
prng = std.rand.DefaultPrng.init(@intCast(seed));
prng = std.Random.DefaultPrng.init(@intCast(seed));
} else {
prng = std.rand.DefaultPrng.init(@intCast(clock.millis()));
prng = std.Random.DefaultPrng.init(@intCast(clock.millis()));
}
rand = prng.random();
}
Expand Down
4 changes: 2 additions & 2 deletions src/uiagentrandom.zig
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ pub const UiAgentRandom = struct {
if (!randInited) {
randInited = true;
if (config.RANDOMSEED) |seed| {
prng = std.rand.DefaultPrng.init(@intCast(seed));
prng = std.Random.DefaultPrng.init(@intCast(seed));
} else {
prng = std.rand.DefaultPrng.init(@intCast(clock.millis()));
prng = std.Random.DefaultPrng.init(@intCast(clock.millis()));
}
rand = prng.random();
}
Expand Down
6 changes: 2 additions & 4 deletions src/webmain.zig
Original file line number Diff line number Diff line change
Expand Up @@ -209,18 +209,16 @@ pub fn logFn(
) void {
_ = message_level;
_ = scope;
_ = console.print(format ++ "\n", args) catch 0;
_ = console.print(format, args) catch 0;
}

pub const std_options = .{
pub const std_options: std.Options = .{
.logFn = logFn,
.log_level = .info,
};

pub fn panic(msg: []const u8, trace: ?*std.builtin.StackTrace, ret_addr: ?usize) noreturn {
_ = ret_addr;
_ = trace;
@setCold(true);
_ = console.print("PANIC: {s}", .{msg}) catch 0;
while (true) {}
}
Expand Down

0 comments on commit 057bef5

Please sign in to comment.