-
Notifications
You must be signed in to change notification settings - Fork 9
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
Use pre-built static webui libraries #27
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
webui.h
was updated to it's v2.3 release state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Source files that are not needed anymore were removed.
Big improvement! This will speed up the compiling time. Thank you, @tobealive 👍
The release has no debug version. Probably we should start adding the debug version to the release package as many other projects/repo does. Otherwise, I don't have another solution. |
It's my pleasure 👍 A way of handling releases I had in mind was adding an automated release workflow when you create a release tag. A CI action would compile and upload the debug and release prebuilts to github releases. If you think that is a good way, I should find the time to integrate the CI on the core repository and add a sample of pulling the libraries here on this vlang version. |
It is looking good, however i need to be sure about platform support before merging it. |
Thanks for the reply @malisipi. No worries, take you time 👍 . If - due to the limited time - attaching the executables for the different platforms or something is of any help, let me know. |
|
Thanks for testing! I can compile with tcc on linux, when you find a moment can you share about your issues on linux? On windows I can confirm, tcc is the same result as discussed in #21. Using gcc precompiled lib is just the suggested workaround in this issue until When pre-builts are moved to a more automated handling, adding pre-builts versions with different compilers can also be considered. But afaik a gcc precompiled lib should work with all compilers in the final program. |
Edit: Linux and Mac work with all compilers. For windows, the only working compiler is gcc. The results match with the results I had testing locally. https://github.com/tobealive/v-webui/actions/runs/5506931824 |
In Linux (and maybe MacOS), V uses another C compiler when TCC was crashed. You can see it with In Windows, Clang is working with a few trick. It can be fixed with disabling warnings with |
Didn't knew about those 🤓 thanks for the info @malisipi! I'll rebase this against main for the ci and do some tests with the new insights tomorrow 👍 |
Adding For the tests I could do with clang. It won't compile on windows: Until a few moments ago I thought there is a also clang compiled Windows webui core. That's why I mentioned that we might just use the clang prebuilt. Realizing there is none for Windows I made a If clang requires too much of a workaround to be usable, I'd say gcc out of the box for windows is fair enough. And there is still wsl. Edit: |
Having results available via github releases is probably close enough to not add the prebuilts to the repo as intermediary step but directly handle them via gh releases. I'll update this accordingly when the related upstream changes are done. |
I found a good approach that can be used already - prior to making a release = to prepare the wrapper with the newest changes. Submitting it after work this night 👍 |
Superseded by #37 |
This PR moves towards using the pre-built libraries, like e.g.
go-webui
does.Reasons for this were discussed e.g. in #21, #25
The pre-builts are added as repository files, like it's done in other webui repositories. But as mentioned in e.g webui-dev/webui#114, pre-built fiels should be moved out of the repositories mid-term. For this I can submit a solution to handle them via github releases, when a free moment opens up in the coming weeks - first to the main repo and then update
v-webui
accordingly.I couldn't test the changes on windows. Please verify that examples buildEdit:
I came to test the changes on linux, macos m1 and windows. So we should be good 🙂. To give a quick glance compiling the text-editor example on windows with
v -cg -cc gcc run .\text-editor.v
:Last, I'd like to mention that there comes a drawback when using the static pre-builts. It won't be possible to pass
-d webui_log
, as the libs would have to be compiled with the debug flag. We could handle this by also including the set of prebuilts with the debug flag. I'd like to hear you opinion on this.