webui-dev / webui

Use any web browser or WebView as GUI, with your preferred language in the backend and HTML5 in the frontend, all in a lightweight portable lib.
https://webui.me
MIT License
2.36k stars 144 forks source link

Refine and fix building with zig #369

Closed ttytm closed 1 month ago

ttytm commented 1 month ago

The PR fixes and refines building with Zig.

The changes are also a preparation to allow a simple integration for building with Zig 0.12.0 in a follow-up.

The goal of this PR is to simplify the code while making it more expressive and extending functionality at the same time.

It also allows to zig-build with extended information. E.g. what is currently a silent build, can give info based on the build options, like:

❯ zig build -Dverbose -Ddynamic
Building dynamic WebUI library...
Done.

It's not a huge diff, but still fairly big. So just reviewing and testing the new build.zig result locally might be an easier approach.

jinzhongjia commented 1 month ago

ha? So you want to add 0.12 zig support to the webui?

jinzhongjia commented 1 month ago

I think subsequent adjustments to 0.12 are best placed in zig-webui

jinzhongjia commented 1 month ago

Oh, my problem, please ignore what I said above, I just checked the commit record Glad you keep submitting code @hassandraga , haven't seen you in a few months

I should also make a new adaptation on zig-webui for 0.25.0

ttytm commented 1 month ago

Yeah, this is just about continuing to support building the webui C library with the zig build system as it's already in there. All zig WRAPPER api code should continue to go to the zig-webui repo.

ttytm commented 1 month ago

I'm gonna finish the PR this likely tomorrow or the day after tomorrow. Unfortunately, there is a lot of work atm