3 ms·
Native support for this would be good, but I think you can already compile most desktop apps to HTML5/WebGL using WebAssembly.
by XCSme 5y ago
Native support for this would be good, but I think you can already compile most desktop apps to HTML5/WebGL using WebAssembly.
- 10000truths 5y agoWebAssembly alone is not enough, you need access to the canvas and WebGL JavaScript APIs in order to actually perform the rendering. WASI may change this in the future, but for now, it means that integration with the emscripten toolchain is a must.
- XCSme 5y agoYes, I was referring to compilation using emscripten, but I couldn't remember the name, thank you!
- flohofwoe 5y agoFor a big engine like this there's a lot more work involved then cross-compiling the code to WASM. All lower-level parts that sit on top of OS APIs like IO, 3D-rendering, audio, networking, etc... need to be ported over, and the browser is a very different runtime environment than native OS APIs, so sometimes it's not even possible without a lot of compromises which may "drag down" other parts of the engine.
- XCSme 5y agoHmm, I was under the impression that there already are tools that automatically convert system API calls (IO, audio, networking) to web-compatible APIs.
- cachvico 5y agoConsider for example that TCP sockets are not available in the browser. There are other protocols available, but no simple TCP sockets. So you can see there are fundamental differences there that cannot simply be abstracted over.