[master < T0792-MG] Add wasm compilation target to mgclient#35
Conversation
|
🎉💪 |
| socklen_t addrlen) { | ||
| long status = MG_RETRY_ON_EINTR(connect(sock, addr, addrlen)); | ||
| if (status == -1L) { | ||
| if (status == -1L && errno != EINPROGRESS) { |
There was a problem hiding this comment.
Add this only for __EMSCRIPTEN__
There was a problem hiding this comment.
I would either introduce a function to check the status and it would be defined differently based on EMSCRIPTEN is used or not, or put a comment about this to the source.
f2ef513 to
c4746ab
Compare
| endif() | ||
|
|
||
| generate_export_header(mgclient-shared | ||
| generate_export_header(mgclient-static |
There was a problem hiding this comment.
Why is this changed? We have to be careful with these things because maybe other clients depend on precisely this?
There was a problem hiding this comment.
We will have it static only for emcripten builds ;)
gitbuda
left a comment
There was a problem hiding this comment.
Since the compilation of webasm is only possible on Linux for now, I think we should implement a bash script to install the SDK (and all related deps) + do the actual compilation. In addition, the GHA setup has to be extended with that workload/job. Once all that is in place, the same code could be used inside jsmgclient to build the actual package (or any other dependent client).
ef84091 to
cf3110d
Compare
|
Add CI job to run WASM build 😄 The hard-coded paths in the WASM scripts are not great. You can use the following to make the script independent of where it is run and then create a |
3a66b15 to
ffd0fd2
Compare
jbajic
left a comment
There was a problem hiding this comment.
Just small comments, but otherwise fine from my side.
antaljanosbenjamin
left a comment
There was a problem hiding this comment.
I think the changes contain a lot if improvements, however I think this PR still needs a few changes. In my mind the goal is to reduce the usage of ifdef in files:
mgwasm.hdoesn't need to be protected with ifdefsmg_transport_yield_until_async_xxxfunctions should be usable in not WASM builds, so there is no need to ifdef them out.
For the second point I think we still miss a level of indirection as I mentioned in my comments.
antaljanosbenjamin
left a comment
There was a problem hiding this comment.
Two small changes!
3c8a928 to
885f4ff
Compare
No description provided.