ThePhD / sol2

Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
http://sol2.rtfd.io/
MIT License
4.06k stars 492 forks source link

Build with emscripten? #1564

Closed manhnt9 closed 6 months ago

manhnt9 commented 6 months ago

Hi, I'm wondering if there is current possibility to run sol3 on the web? Typically with webassembly (emscripten?). If there isn't, could you give some instructions to contribute? I suppose that we'd have to implement a lua backend on web for sol3 to use, basically replacing the lua library with web version.

RobbinMarcus commented 6 months ago

Hey @manhnt9, this is quite easy to do right now. If you take a look at a question I posted and implement the small changes mentioned here: https://github.com/ThePhD/sol2/issues/1565 I found that using Lua and Sol2 works out of the box without any other changes needed. This issue contains a cmake project with a setup that should get you up and running if you're interested.

manhnt9 commented 6 months ago

Hi @RobbinMarcus, thanks for the insights ! I'll test it out. So, the issue can be closed for now. Great news.