I want to build my web server program with Emscripten (note: it uses Boost.Beast for the HTTP stuff, and Beast relies on Boost.ASIO)

334 views
Skip to first unread message

Osman Zakir

unread,
Oct 20, 2018, 4:07:04 PM10/20/18
to emscripten-discuss
I want to ask if it's possible to compile a web server application that uses Boost.Beast, which relies on Boost.ASIO for the networking, with Emscripten (and make a Node.js app).  I heard that it's hard to do port such an application to WebAssembly because ASIO doesn't support WebAssembly, but I think as long it's not impossible I should still try.  If it's not feasible or would be too hard, then I want to know if I could make Node.js module without generating WebAssembly if I compile with Emscripten.  

The app also has three static assets.  I'll show the code here.  It's a currency converter application with a Google Maps GUI, basically.  I made it for a CS course's final project.


I'll have to build Jinja2Cpp again and I'm having trouble with CMake on Windows.  I'll use the Emscripten compiler to build it on my Linux VM.  

Osman Zakir

unread,
Oct 20, 2018, 7:14:09 PM10/20/18
to emscripten-discuss
The current code that I have synchronous, but I can make it asynchronous; I used the synchronous HTTP server and client example code from the Beast GitHub repo to write my code, so I can just use the asynchronous version now if I need to make my code asynchronous.  But first I just need to know if there's a workaround for the fact that the ASIO library doesn't support WebAssembly, and I also need to how to build a Node.js app using Emscripten (I'm going to be reading the Documentation again in case it's mentioned there).  
Reply all
Reply to author
Forward
0 new messages