The latest Zig master supports specifying a specific macOS version for libc, via
the target triple (ziglang/zig#10215):
* x86_64-macos.10 (Catalina)
* x86_64-macos.11 (Big Sur)
* x86_64-macos.12 (Monterey)
* aarch64-macos.11 (Big Sur)
* aarch64-macos.12 (Monterey)
Mach's `system_sdk.zig` can now download the relevant XCode framework stubs
for Big Sur (11) and Monterey (12). Although we don't have an SDK for Catalina (10)
currently, we use the Big Sur (11) SDK in that case and it generally works fine.
By default, Zig targets the N-3 version (e.g. `x86_64-macos` defaults to `x86_64-macos.10`).
Targeting the minimum supported version is useful for compatability, it guarantees the produced
binary will run on any later macOS version. Targeting the newer version can be useful if you
wish to use newer APIs not available in previous versions.
Fixeshexops/mach#102
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This removes a linker hack which was preventing building with the latest
Zig master version. Of particular note, anyone wishing to use this library
will need to ensure they are up to date with latest master.
The binary releases available at https://ziglang.org/download/ (1783+eec825c and
beyond) are sufficient (really, anything released after today.)
Fixeshexops/mach#103
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Bring back the 'c.GLFW_NOT_INITIALIZED' prong in 'convertError', such that if it is ever passed that error code, we can differentiate it from just an invalid input; because it is a valid input, we just guarantee that it won't occur.
Updates us to using the newer SDK https://github.com/hexops/sdk-macos-12.0
Also enables cross-compilation of the `mach/gpu` backend for macOS.
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Mozilla and Google both found SPIRV-Cross to be insufficient and built Naga and
Tint, respectively, so there's no need to support this build option.
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
It's nicer to refer to this in code as `gpu`. Additionally, `webgpu` as a name
gives the impression this is for web only which is absolutely not true but could
understandably be very confusing to newcomers.
Solve both problems by renaming to just `gpu`, and (next) updating the README to
indicate what it does and why, then explain it's WebGPU after as more of an
implementation detail.
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>