I've WASM'ed my Compose/Web <test-card homepage>. ...
# webassembly
d
I've WASM'ed my Compose/Web test-card homepage. It's not much, but it's all WASM (GC flag enablement required) 🙂 More soon...
❤️ 1
🎉 3
👍 3
Learnings: •
wasmBrowserDistribution
task doesn't look ready, or I couldn't figure out how to use it. I ended up using the
wasmBrowserWebpack
task to generate the hosted output. • This creates
mjs
files which aren't recognised by nginx's default configuration. It was necessary to add
mjs
to the
javascript/application
MIME type.
• The Chinese font at the bottom of the page is the biggest file @ almost 10MB 🤦‍♂️ • The homepage wasm itself is only 2.5MB down from 5.6MB thanks to
binaryen
compression 🙂
o
Love that emoji 🥰 animation! Could you make your server support compression? My browser says it's downloading a whopping 23.9 MB in total... 🙃
d
Yeah I already turned on GZip lol
I should choose a plainer glyph or ditch the Chinese writing, I just wanted to prove it could render. Testing out capabilities.
o
Yeah, I learned about that Lottie thing last time when you were setting up that page. Seemingly still no compression arriving here. 🤔
d
Huh ok, I'll double check that. Thanks.
Yes, turns out gzip requires switching on per MIME-type. After some server-wrangling the data transferred is around halved to a 'mere' 13MB 🙃
Thanks for calling it out.
o
👍 So that worked to some extent. Half of the size is just that Japanese font...
d
Yes, I'll keep it since the page is serving its purpose to highlight the do's and don'ts for a Native Mobile / Desktop guy like me who's fancying WASM as a way to branch out onto Web after all these years.
I have another homepage in mind to replace this test-card later. Next; I wonder if shaders are supported via WebGL 🤔
Thanks! Registered 🙂
...and token now applied!