From 1c49a53413254c5ea1eea3bed7fbe5dd3f199593 Mon Sep 17 00:00:00 2001 From: Sublime Tshimpangila Date: Wed, 17 Jun 2026 21:03:34 -0400 Subject: [PATCH 1/2] move to zig 16 --- src/main.zig | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main.zig b/src/main.zig index b838320..ac3d34e 100644 --- a/src/main.zig +++ b/src/main.zig @@ -22,18 +22,21 @@ const build_context = eval_pkg.build_context; const sema = eval_pkg.sema; const expect = std.testing.expectEqual; -pub fn main() !void { +pub fn main(init: std.process.Init) !void { const alloc = std.heap.page_allocator; - const args = try std.process.argsAlloc(alloc); + const io = init.io; + + const args = try init.minimal.args.toSlice(alloc); assert(args.len == 2); const file_path = args[1]; - const file = try std.fs.cwd().openFile(file_path, .{}); - defer file.close(); + const file = try std.Io.Dir.cwd().openFile(io, file_path, .{}); + defer file.close(io); const MAX_SIZE = 1024 * 1024; - const source_code = try file.readToEndAlloc(alloc, MAX_SIZE); + var file_reader = file.reader(io, &.{}); + const source_code = try file_reader.interface.allocRemaining(alloc, .limited(MAX_SIZE)); defer alloc.free(source_code); var lexer = Lexer.init(source_code, file_path); From c94f4515b3ae904a7d791125b44919e5a3f54b96 Mon Sep 17 00:00:00 2001 From: Sublime Tshimpangila Date: Wed, 17 Jun 2026 21:11:17 -0400 Subject: [PATCH 2/2] update compiler version ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d389198..520b3b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v2 - name: Setup Zig run: | - sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-x86_64-linux-0.15.2.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin' + sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-x86_64-linux-0.16.0.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin' - name: check linting run: zig fmt --check .