Time |
Nickname |
Message |
00:14
🔗
|
bai |
hmm |
00:15
🔗
|
bai |
unity's loader seems to have some way of detecting wasm |
00:16
🔗
|
bai |
I think you can just look if (typeof window.WebAssembly != 'undefined') |
01:27
🔗
|
phe |
there is a fallback provided by emscripten, you can try a wasm module and emscripten fallback to interpret it if !window.WebAssembly but it's way too slow |
01:40
🔗
|
phe |
hmm, I thought the fallback was to generate asmjs from the .wasm in the client browser but it look like very experimental |
01:41
🔗
|
Vito` |
maybe that makes sense for tiny apps |
01:42
🔗
|
Vito` |
but I'm going be delivering tens of MBs of JS I'm not going to have a client browser deal with something they don't have to |
01:42
🔗
|
Vito` |
I want to either insert a .wasm or a .js depending on the browser's support |
01:45
🔗
|
phe |
(typeof window.WebAssembly != 'undefined') is the way then, btw chrome as real issue with big module wasm,, it compile the whole .wasm file before starting, on a mame/pacman build it freeze my browser using 4 core for 15 seconds, unsure if it's a good idea to provide .wasm, I bailed out from was after seeing that |
01:49
🔗
|
Vito` |
wasm isn't already compiled? |
01:50
🔗
|
phe |
it is to byte code, what freeze is chrome compling the whole thins to native machine code, it doesn't jit function by function actually |
01:50
🔗
|
Vito` |
ah |
01:50
🔗
|
phe |
I hope they'll fix it for 58 |
01:53
🔗
|
Vito` |
if it's a "just for now" thing I'm not too concerned |
01:54
🔗
|
phe |
yeah, I liked to experiment wasm :) |
02:06
🔗
|
|
phe has quit IRC (Quit: Leaving) |
02:36
🔗
|
bai |
hmm, I don't see that sort of delay on my wasm builds |
02:36
🔗
|
bai |
there's a wasm interpreted mode fallback but it's eaaay slower than asm.js was |
09:53
🔗
|
|
phe has joined #jsmess |
15:09
🔗
|
Vito` |
https://jamesfriend.com.au/porting-pce-emulator-browser |
15:09
🔗
|
Vito` |
I want to read the MESS/MAME version of this |
16:29
🔗
|
SketchCow |
It'd be nice |
16:46
🔗
|
SketchCow |
I've asked a dev to plunk in the new loader.js. |
16:46
🔗
|
SketchCow |
We'll see how long it takes. |
19:06
🔗
|
|
zino has joined #jsmess |
22:28
🔗
|
db48x |
Vito`: wouldn't you be the one writing the MESS/MAME version of that article? |
22:28
🔗
|
db48x |
as for wasm, I wrote some code to load a wasm module |
22:30
🔗
|
db48x |
but from what I've seen, emscripten still generates some javascript, even when compiling the bulk of it to wasm |
22:38
🔗
|
bai |
yeah, there's a .js and a .wasm file |
22:38
🔗
|
bai |
and a .wasm.mem |