Wasm + iOS Safari: full of traps
I assumed wasm on mobile would Just Work. Yep, very naive of me.
The traps I tripped on:
iOS Safaristack overflow during JSX eval.-O0blewQuickJS's dispatch recursion past Apple's wasm stack limit.-O2at link fixed it (and dropped the binary 13.5 MB -> 3.8 MB as a free bonus)- Touch events did literally nothing.
iOSdoesn't reliably synthesizemousedownfrom a touch, had to wiretouchstartmyself - Taps landed on the wrong button.
targetXis CSS pixels, hit-test runs in canvas-buffer pixels,iOSshrinks the canvas via CSS. Multiply bycanvas.width / canvas.clientWidthand we're good - The default emscripten shell is REALLY ugly. Replaced with a 1.3 KB centered-canvas shell
Just Works, eventually (:
