oh my fucking god https://developer.mozilla.org/en-US/docs/WebAssembly/Guides/Concepts#porting_from_cc wasm is so fuckex
By itself, WebAssembly cannot currently directly access the DOM; it can only call JavaScript, passing in integer and floating point primitive data types. Thus, to access any Web API, WebAssembly needs to call out to JavaScript, which then makes the Web API call. Emscripten therefore creates the HTML and JavaScript glue code needed to achieve this.
literally what the fuck is the point of this. any of this
@hipsterelectron They should expose internal browser stuff in a bit of language-independent (likely also ABI-independent?), perhaps dotNET-ish way, yeah...
And Emscripten is also very cursed. When I tried to get it to build I learned how many CMake tricks it uses. ...There's a lotta those.