[build.zig] Refactor - #5764
Conversation
Temporarily disabled the tests
|
@HaxSam thanks for working on this improvement EDIT: Maybe @michaelfiber and @Not-Nik (Zig experts) can help with some review/testing |
|
0.15.x worked fine for me but when i tried 0.16.0 it fails: i'll try both on windows and mac next. im using RGFW backend but the error is there for glfw as well |
|
@CrackedPixel great catch, thank you Edit: It seems like you use an older version of the repo because this line doesn't exist anymore and was changed for 0.16.0, so it can't run. PS. Important: when it can run on 0.15.0 it can't on 0.16.0 and vice versa, there were too many breaking changes |
|
Hi @HaxSam here is the error that I get when I try to build the lib for Android Error before the refactor: |
|
Oh yeh good catch you need to set the platform to |
|
If possible can you fix the generation of android-libc.txt as well from the previous version. |
|
@maiconpintoabreu Iam dont really deep into anroid target so I need more details to fix it. |
|
So its done here all the options
|
|
Tomorrow is the weekend. Thanks for all the help and for waiting for the official 6.0.0 release even though it's "just" a third-party build system. |
|
@maiconpintoabreu nice so android is now working with zig + raylib |
|
@HaxSam @CrackedPixel please, let me know when ready to merge! |
|
Big patch, and I didn't have time to go over it thoroughly, but I feel there is a lot of redundant code. I like that we now have clean support for all backends, but the way it written here looks like it's done with brute force. We have a bunch of This comes mostly from the similarities between glfw and rgfw. Code readability is already acceptable overall though, so a (hesitant, because first sentence) r+. |
|
Yeh Iam still not 100% happy about the linking toptic but I think I got it reduced a lot. If you have ideas I thankfully take them |
|
@Not-Nik just cleaned it up |
|
From my side I feel like I fished everything I wanted |
|
@HaxSam RGFW tested on zig 0.16.0 linux ✔️
windows ✔️
mac (arm) ✔️there were 2 quirks:
mac (intel) ❓
|
|
@HaxSam tested win32, the only issue is that "lshcore" should be "shcore". after that change it worked great! |
|
@HaxSam tested drm. there are 2 issues:
to test on linux you just need to switch to a different TTY (ctrl+alt+f3, etc) and then run it like so: with those 2 changes it worked perfectly |
|
@CrackedPixel Thank you for your testing |
|
win32 and drm work perfect in the most recent version. RGFW linux+windows+mac is perfect as well. nice work! |
|
I really enjoy zig also for its build system thats why I started with it |
|
@HaxSam @CrackedPixel thanks for working on this big improvement! please, let me know when ready!
@Not-Nik Actually, I prefer more redundant code if it is more simple and every platform is kind-of self-contained. I'm using a similar strategy with Makefile, I prefer to discretize directly per platform, even if there is duplicate code. |
|
Iam finished with all the changes and approvements. |
|
LGFM (Android) |
|
@HaxSam @CrackedPixel @Not-Nik I'm running out of time for the new release, so meerging it and hope for the best! |
|
Looks great! Zig people will appreciate it 😎 |

Clean up the build.zig file
The platform implementation was not right and only worked on Windows