Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build.zig] Make emscripten build compatible with Zig 0.13.0 #4121

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

myQwil
Copy link
Contributor

@myQwil myQwil commented Jul 1, 2024

When attempting to export a project for the web with emscripten and Zig 0.13.0, I would get the following error:

std.debug.panic("sub_path is expected to be relative to the build root, but was this absolute path: '{s}'. It is best avoid absolute paths, but if you must, it is supported by LazyPath.cwd_relative", .{
                       ^
raylib/src/build.zig:213:45: 0x11dd8dd in compileRaylib (build)
                raylib.addIncludePath(b.path(cache_include));

The proposed change has shown to work for both Zig versions 0.12.0 and 0.13.0.

Also added .zig-cache/ to .gitignore, as the name of the cache folder gets changed in 0.13.0

@raysan5 raysan5 merged commit 9e22fdd into raysan5:master Jul 1, 2024
14 checks passed
@raysan5
Copy link
Owner

raysan5 commented Jul 1, 2024

@myQwil thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants