\n
On the city builder website it states:
\n\n\nCompiling Kay to WebAssembly allows running a fully fledged actor system node in the browser, which can communicate with the simulation backend through type-safe high-performance messages and do computation-intensive preparation work for rendering, before efficiently serialising and passing rendering-relevant information as JavaScript objects to a React app that implements the rest of the UI. The React app can call Rust hooks that were exported to JavaScript, to send Kay messages back to the simulation backend for influencing the game world based on player input.
\n
Meaning they use WebAssembly to handle all out their computationally intensive rendering work, and all of their UI work to their React UI. This is an EXCELLENT use of WebAssembly, as it shows that you can still leverage the great UI patterns of the web and use JavaScript for what it is very good at, but replace all of the hard processing with a language that is much better suited for it. That way, your app can get much greater performance (compared to writing computationally intensive code in JavaScript) on the web!
\n