Re: Getting a better understanding on how a WASM runs

Hi Vincent
 Thanks for your query.
 The definition of "VM" is not as clear cut as it might seem at first
sight. However, generally, in the context of WebAssembly, I would say that
VM means something like "an engine that can take WebAssembly byte codes and
run the contents thereof".

So, most browsers have  WebAssembly VM built-in; and some engines are
described as being Virtual Machines.

But, not all implementers of WebAssembly take this route; for example,
wasm2c is a tool that takes in WebAssembly and generates C code.

Hope this helps
Francis

On Thu, Mar 23, 2023 at 7:29 AM vincent@solidshield.com <
vincent@solidshield.com> wrote:

> 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).
>
> *Question*
>
> 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,
>
>
> Vincent LEFEBVRE
> SOLIDSHIELD
> +33 (0)6 63 57 91 90 <+33%206%2063%2057%2091%2090>
> TAGES SARL, Le Madère B
> 83 Bd Sadi Carnot, 06110 Le Cannet. France
> email: vincent@solidshield.com <vincent@solidshield.com>.
> www.solidshield.com.
>
>
>
>
>
>
>

-- 
Francis McCabe
SWE

Received on Thursday, 23 March 2023 16:25:11 UTC