floooh / sokol-zig

Zig bindings for the sokol headers (https://github.com/floooh/sokol)
zlib License
341 stars 46 forks source link

`standardReleaseOptions` removed in Zig 0.11.0 #41

Closed terrybrash closed 1 year ago

terrybrash commented 1 year ago

Zig version: 0.11.0-dev.3879+5804f3f75

C:\Users\Terry\sokol-zig>zig build run-triangle
C:\Users\Terry\sokol-zig\build.zig:150:19: error: no field or member function named 'standardReleaseOptions' in 'Build'
    const mode = b.standardReleaseOptions();
                 ~^~~~~~~~~~~~~~~~~~~~~~~
C:\Program Files\zig\lib\std\Build.zig:1:1: note: struct declared here
const std = @import("std.zig");
^~~~~
referenced by:
    runBuild__anon_7280: C:\Program Files\zig\lib\std\Build.zig:1600:27
    steps__anon_7043: C:\Program Files\zig\lib\build_runner.zig:914:20
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

See here: https://devlog.hexops.com/2023/zig-0-11-breaking-build-changes/

floooh commented 1 year ago

Did you check the zig-0.11.0 branch?

This should work with the current Zig dev version, unless some new breakage was introduced recently (but that branch is meant to stay on top of the zig-dev version and then merged into master when zig-0.11.0 is officially released).

Downside of that branch is that it isn't automatically updated on commits to the sokol repository, so it may be behind the latest sokol changes.

The basic idea is though that the master branch supports the current Zig stable version, and any fixes for the current dev version go into a branch which is merged back into master once the next stable Zig version is released.

terrybrash commented 1 year ago

My bad, I was on master. zig-0.11.0 works. :)