Or refer to some existing WASM game examples: https://github.com/extism/game_box/tree/main/games - currently games can be built using Extism PDKs in any of Go, Rust, Javascript/Typescript, Zig, Haskell, AssemblyScript or C/C++!
To make development smoother, what I've been doing is separating the game code and the Extism code. Write unit tests and test harness code against your game code and run it on your host machine.
This can be seen in this tictactoe game in rust: https://github.com/extism/game_box/tree/main/games/tictactoe or this trivia game in typescript: https://github.com/extism/game_box/tree/main/games/wasm-triv...
but, where are all the demos? this indicates that to learn it would be a steep learning curve
eg look/ google p5.play, even the tutorials are playful
There aren't yet high quality docs. But if you want to give it a shot I'd try forking one of those and asking questions in the discord: https://discord.gg/tukQnCME