Yes, you can web-host like a regular static webpage. The Emscripten 
compiler usually outputs three files: one .html, one .js and one .wasm. The 
.html file is basically your index.html which is loaded when visiting the 
URL. The .js and .wasm files are then loaded by the .html file, the only 
rule is that the .js and .wasm file must be in the same web server 
directory as the .html file.

I'm just host my WASM stuff on GH Pages, for instance:

- https://floooh.github.io/doom-sokol/
- https://floooh.github.io/sokol-html5/
- https://floooh.github.io/tiny8bit/
- https://floooh.github.io/visual6502remix/

The visual6502remix page hosting directory looks like this (just the output 
of emcc, with the .html file renamed to index.html):

https://github.com/floooh/visual6502remix

Be aware though that hosting on Github Pages means that some WASM features 
like multi-threading (or rather SharedArrayBuffer) are disabled, because 
the GH Pages web server can't be reconfigured to return the required 
response headers (there's a workaround with service workers which I haven't 
tried yet). Other web hosters allow this sort of configuration, so the 
choice of web hoster dictates what sort of WASM features you can use (which 
IMHO is a massive design wart, but whatever...)

Cheers!
On Thursday, 8 September 2022 at 07:34:02 UTC+2 [email protected] wrote:

> Where can a website created using emscripten be hosted? How? Would most 
> any host work; would it be like a plain HTML website?
>
> I realize that if I learn more about emscripten then I will likely be able 
> to answer my question myself. I am just not sure I want to spend time 
> learning it. I am excited about using C++ for websites. I am however tired 
> of learning things and then wasting my time on something impractical for 
> me. I have tried to search for answers to my question and I did not find 
> answers. I hope the question is a reasonable question.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/fe889199-5060-4157-91e1-c83d6cb6355an%40googlegroups.com.

Reply via email to