\n
Pyodide uses WebAssembly as it takes CPython, a Python interpreter written in C, and uses Emscripten to compile it to WebAssembly. That way, they can then run the python code to do scienctific operations in the browser, by using the WebAssembly compiled Python interpreter. This shows off two great features of WebAssembly:
\nPortability. WebAssembly allows bringin new languages to the web. Both by allowing them to be compiled to WebAssembly to be run in the browser, but also, allowing languages to be run by an interpreter or a compiler, compiled to WebAssembly, to then run in the browser! Therefore, even languages like Python that can't be compiled to WebAssembly (currently), can now be run inside of a web browser!
Performance. Interpreting languages is a very computationally intensive task. Attempting to interpet python with JavaScript would be very slow, and not have predictable performance. WebAssembly fixes this by offering predictable performance, allowing high level languages like python to be interpreted or run at a usable speed!
Please see the Mozilla Hacks article for a deep dive of Pyodide.
\n