Yes it is faster and lighter, but obviously not compatible with old browsers.
I think a port of Phaser to AssemblyScript is concevable, and it could even work with Box2D WASM instead of MatterJS for complexe physics. That’s a good project, maybe I’ll try working on it later.
Edit: maybe not lighter. I did some tests and the result .wasm files were larger than the .js ones.
Yea, some hot paths might be made faster but it won’t be lighter since WASM files also include the runtime like the AssemblyScript runtime or v8 for JavaScript.
Rust has the smallest of the runtimes so in theory having performance-critical hot paths in Rust could be faster and lighter… theoretically