Zig version bump 0.14 -> 0.15

This commit is contained in:
duck
2025-06-15 16:36:06 +05:00
parent 446a3b3d26
commit 52e9c62eeb
3 changed files with 9 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
.name = .spacefarer,
.version = "0.0.0",
.fingerprint = 0x946ddccb5911fb15,
.minimum_zig_version = "0.14.0",
.minimum_zig_version = "0.15.0",
.dependencies = .{},
.paths = .{
"build.zig",

View File

@@ -379,7 +379,7 @@ fn loadShader(device: *sdl.GPUDevice, path: []const u8, info: sdl.GPUShaderCreat
const file = std.fs.cwd().openFile(path, .{}) catch return GameError.OSError;
defer file.close();
const code = file.readToEndAllocOptions(std.heap.c_allocator, 1024 * 1024 * 1024, null, @alignOf(u8), 0) catch return GameError.OSError;
const code = file.readToEndAllocOptions(std.heap.c_allocator, 1024 * 1024 * 1024, null, .@"1", 0) catch return GameError.OSError;
defer std.heap.c_allocator.free(code);
var updated_info = info;

View File

@@ -8,15 +8,19 @@ const PREFIX = "SDL_";
pub fn main() !void {
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer _ = gpa.deinit();
const alloc = gpa.allocator();
var arena = std.heap.ArenaAllocator.init(gpa.allocator());
defer arena.deinit();
const alloc = arena.allocator();
var arg_iter = try std.process.argsWithAllocator(alloc);
defer arg_iter.deinit();
_ = arg_iter.next();
const output = arg_iter.next().?;
const file = try std.fs.createFileAbsolute(output, .{});
const file = if (std.fs.path.isAbsolute(output))
try std.fs.createFileAbsolute(output, .{})
else
try std.fs.cwd().createFile(output, .{});
defer file.close();
const writer = file.writer();