Getting a better understanding on how a WASM runs

Hi there,

First, Thanks for your time in reading and (according to your availability for that) answering this email.  
Fyi, my motivation is getting this clearer view for elaborating as part of EC funded collaborative project, the progress we could (tbd) make on WASM security. In that sake, I would first need to remove the blur in my mind to get a better understanding on the very basic, notably what a WASM needs to execute (on a browser at first).


I have read that a WASM does not need a VM to be executed (while the specifications stipulates that the instructions format shall be valid for any platforms). There is ofc a contradiction there. As I can also read that WASM is constructed over javascript and all of the targeted browser embarks their own javascript interpreters (ie, a VM), I understand that, provided the javascript interpretor is instantiated on the host browser, there is no need for another WASM specific VM. However, if that is the case, (i.e., WASM is interpreted on the browser’s javascript interpreter-VM), I do not get how WASM can be more efficient than “native” javascript. In other words, what brings the performance advantage to WASM. 
If WASM exploits a specific performance-improved mode of the interpreter (just a guess), then Javascript could do it too.

Thanking you again,

+33 (0)6 63 57 91 90
83 Bd Sadi Carnot, 06110 Le Cannet. France

Received on Thursday, 23 March 2023 14:29:21 UTC