Skip to content

Update raylib to the latest version#101

Merged
Not-Nik merged 2 commits intoraylib-zig:develfrom
oneearedrabbit:patch-1
Jun 5, 2024
Merged

Update raylib to the latest version#101
Not-Nik merged 2 commits intoraylib-zig:develfrom
oneearedrabbit:patch-1

Conversation

@oneearedrabbit
Copy link
Contributor

@oneearedrabbit oneearedrabbit commented Jun 5, 2024

This includes a fix from raysan5/raylib#4012 which resolves the emsdk "headers must be a relative path" error when building wasm32-emscripten target.

Before:

$ zig build -Dtarget=wasm32-emscripten --sysroot /.../emsdk/upstream/emscripten
thread 10031917 panic: sub_path is expected to be relative to the build root, but was this absolute path: '/.../emsdk/upstream/emscripten/cache/sysroot/include'. It is best avoid absolute paths, but if you must, it is supported by LazyPath.cwd_relative
...

After:

$ zig build 2d_camera -Dtarget=wasm32-emscripten --sysroot /.../emsdk/upstream/emscripten
steps [7/9] run /.../emsdk/upstream/emscripten/emcc... Now listening at http://0.0.0.0:6931/
INFO: Initializing raylib 5.1-dev
...

@Not-Nik Not-Nik merged commit 171c2e1 into raylib-zig:devel Jun 5, 2024
@oneearedrabbit
Copy link
Contributor Author

Ah, thanks for updating the API! Just for my own education: do I need to update files manually next time, or is there a script that I can run?

@oneearedrabbit oneearedrabbit deleted the patch-1 branch June 5, 2024 20:10
@Not-Nik
Copy link
Member

Not-Nik commented Jun 5, 2024

The header files need to be updated manually, but the zig files are update with the generate_functions.py script

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