Re: Need helping porting my C++ webserver application

I'm going to try to preload my static assets into the virtual filesystem and read about what to in order to avoid functions I need called being removed as dead code with ccall again.  I also remembered I need to read again about what to do with std::shared_ptr.  I do also want to ask, first, though: what flags do I specify when I want to compile C++ that has a webserver to WebAssembly with em++?  And what do I do, specifically, if I want to use the app on the backend through Node.js?

The files I want to preload are my index.html, scripts.js and styles.css files.

What extension should I use in my compilation command to em++ for the output file?  Would building a currency_converter.wasm file be okay?
________________________________
From: Osman Zakir <osmanzakir90@hotmail.com>
Sent: Thursday, November 15, 2018 4:34 PM
To: public-webassembly@w3.org
Subject: Need helping porting my C++ webserver application

Hi.

I made my C++ webserver app completely asynchronous (though I hope I could've done it without the global variables I used).  And someone I know on a C++ Discord group pointed me to an ASIO port for Emscripten that's already been done officially, which I used.  That's here: https://github.com/emscripten-ports/asio .  I replaced the ASIO in my Boost distribution with this.  My own code is in this repository: https://github.com/DragonOsman/currency_converter .

I'd like to know if my code can be compiled to WebAssembly as it is now or if I still have to do something to it.  Also, I'm using Visual Studio 2017 on a Windows 10 Home laptop.  Is it possible for me to compile to WebAssembly using Visual Studio?  Thanks in advance for any replies and/or help.
[https://avatars0.githubusercontent.com/u/18173932?s=400&v=4]<https://github.com/DragonOsman/currency_converter>

GitHub - DragonOsman/currency_converter: Application for Computer Science course<https://github.com/DragonOsman/currency_converter>
Google Maps + Currency Converter Web Application. Application for Computer Science course. This is a currency converter web application with the frontend and a backend.
github.com


[https://avatars1.githubusercontent.com/u/8116924?s=400&v=4]<https://github.com/emscripten-ports/asio>

GitHub - emscripten-ports/asio<https://github.com/emscripten-ports/asio>
Join GitHub today. GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
github.com

Received on Thursday, 15 November 2018 15:29:42 UTC