diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 411b492b..f4866613 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: git config --global core.autocrlf false git config --global core.eol lf - name: Checkout zigimg - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: path: zigimg - name: Checkout test-suite fixtures @@ -23,9 +23,9 @@ jobs: repository: zigimg/test-suite path: test-suite - name: Setup Zig - uses: mlugg/setup-zig@v1 + uses: mlugg/setup-zig@v2 with: - version: 0.14.0-dev.2577+271452d22 + version: 0.14.1 - name: AST Verify run: zig fmt --check --ast-check src/ working-directory: zigimg diff --git a/README.md b/README.md index 3b1630bd..30803616 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,7 @@ This is a work in progress library to create, process, read and write different ## Install & Build -This library uses zig nominated [2024.11.0-mach](https://machengine.org/about/nominated-zig/). To install using [`zigup`](https://github.com/marler8997/zigup): - -```sh -zigup 0.14.0-dev.2577+271452d22 -``` +This library currently uses zig [0.14.1](https://ziglang.org/download/), we do plan to go back to using mach nominated zig until a newer version than 0.14.1 will be nominated. ### Use zigimg in your project diff --git a/build.zig.zon b/build.zig.zon index 8ac3f214..fc288f64 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,5 +1,7 @@ .{ - .name = "zigimg", + .name = .zigimg, + .fingerprint = 0x6d2b443cdaa8f7f3, + .minimum_zig_version = "0.14.1", .version = "0.1.0", .paths = .{""}, } diff --git a/src/formats/png/reader.zig b/src/formats/png/reader.zig index 1f634b3c..1b7413a2 100644 --- a/src/formats/png/reader.zig +++ b/src/formats/png/reader.zig @@ -652,7 +652,7 @@ pub const ReaderProcessor = struct { const ptr_info = @typeInfo(Ptr); std.debug.assert(ptr_info == .pointer); // Must be a pointer - std.debug.assert(ptr_info.pointer.size == .One); // Must be a single-item pointer + std.debug.assert(ptr_info.pointer.size == .one); // Must be a single-item pointer const gen = struct { fn chunkProcessor(ptr: *anyopaque, data: *ChunkProcessData) ImageUnmanaged.ReadError!PixelFormat { @@ -773,7 +773,7 @@ pub const TrnsProcessor = struct { }; var pixel_pos: u32 = 0; // work around broken saturating arithmetic on wasm https://github.com/llvm/llvm-project/issues/58557 - const isWasm = comptime @import("builtin").target.isWasm(); + const isWasm = comptime @import("builtin").target.cpu.arch.isWasm(); switch (self.trns_data) { .gray => |gray_alpha| { switch (data.src_format) { @@ -983,7 +983,7 @@ pub fn CustomReaderOptions2(Processor1: type, Processor2: type) type { const root = @import("root"); -pub const NoopAllocator = Allocator.VTable{ .alloc = undefined, .free = undefined, .resize = undefined }; +pub const NoopAllocator = Allocator.VTable{ .alloc = undefined, .free = undefined, .resize = undefined, .remap = undefined }; /// Applications can override this by defining DefaultPngOptions struct in their root source file. /// We would like to use FixedBufferAllocator with memory from stack here since we should be able