Hi folks, I recently went through the WASM book and had a great time. After getting the Game of Life example working well, I decided to port it entirely to Rust, and followed the "building without a bundler" advice to get it running on my website without any JS tooling in sight. This also worked!
I'm at a state now where I'd like to try and cut the WASM binary size:
Strange, adding alloc like that actually increased the binary size. Either way, I'm still trying to think of a way to avoid this RefCell approach entirely, as opposed to just importing them in a different way.
I find this much nicer and idiomatic since it simply cancels on drop.
gloo feels to me like it may have stagnated a bit, so for now I've copied it into my hodgepodge collection of web stuff under the tick feature at awsm_web
That certainly works, and it's how I had it originally while following the WASM guide.
My aim in particular was to see if it was possible to do the entire thing in Rust, and to discover what costs were involved. Overall it went pretty well.