Skip to content

Update to raylib 6.0 + add purego support for desktop platforms - #544

Merged
gen2brain merged 61 commits into
gen2brain:masterfrom
JupiterRider:raylib_6
May 13, 2026
Merged

gen2brain merged 61 commits into
gen2brain:masterfrom
JupiterRider:raylib_6

Conversation

@JupiterRider

@JupiterRider JupiterRider commented May 4, 2026 •

Copy link
Copy Markdown
Contributor

Do not merge please. This PR is not completely finished, but ready for review and testing.

This solves #542 and make #361obsolete.

  • Update c sources to raylib 6.0
  • Add purego implementation by using libffi (supports MacOS, Windows, Linux and FreeBSD)
  • embed shared libraries (purego version)
  • Update purego and cgo implementations to raylib 6.0 (functions, types, constants, etc.)
  • Make the API/signature ( cgo <-> purego) match -> purego misses Asset.Open, Asset.ReadDir and Asset.ReadFile
  • Review doc comments ( diff between cgo <-> purego) and update to raylib 6.0
  • Update examples -> examples/models/m3d_loading needs a rewrite because of raylib's new Model Animation System done with 1cd6f30
  • Update README.md with new purego instructions
  • Make functions UpdateAudioStream, UpdateTexture, UpdateTextureRec, SetUniform generic (better compile-time safety)

@gen2brain

Copy link
Copy Markdown
Owner

Sorry, did not have time. I will try to test this in the next few days. I notice that the new X11 pkg-config dependency, that is from GLFW, right? They usually used dlopen for X11 call, if we include it just like that, it will break x11/wayland build tags.

@JupiterRider

Copy link
Copy Markdown
Contributor Author

@gen2brain Without linking X11, I got a compile-time error. This commit is the reason: raysan5/raylib#5603

As an alternative, we could set SUPPORT_CLIPBOARD_IMAGE in config.h to 0.

@JupiterRider

Copy link
Copy Markdown
Contributor Author

@gen2brain The PR is complete and ready to merge in my opinion.

@gen2brain
gen2brain merged commit 67668d8 into gen2brain:master May 13, 2026
10 checks passed
@gen2brain

Copy link
Copy Markdown
Owner

Merged, thanks! This is nice. I need to do some additional checks and modifications before tag, Android main(), noaudio, etc. And it seems that CLIPBOARD_IMAGE is guarded with X11 checks/defines for GLFW and RGFW, so we just need !wayland for the new pkg-config addition, I think, needs to be tested.

@ntswamp

ntswamp commented May 13, 2026

Copy link
Copy Markdown

thanks for the great work! now waiting for the tag to update my project ;p

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.

3 participants