I learned about how can I use the canvas from rust and wasm-bindgen (example like this: https://rustwasm.github.io/wasm-bindgen/examples/2d-canvas.html). It is pretty fast, but I am guessing still there must be an overhead for every canvas call, right? So the proper solution for a canvas-based game would be: canvas drawing calls from a javascript function, game logic running on rust/wasm, and call the js drawing function with game state data?
So I should avoid thousands of canvas draw calls from wasm-bindgen for optimal performance, right?