Marcellvs
Marcellvs

Reputation: 461

WebAssembly runtime vs. interpreter vs. engine

From webassembly.org:

WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine.

In the context of Wasm/WASI, what is

and in the above context:

I suppose the practical meaning of these terms can differ when used in a web browser context, but I think focus should be on the native usage of Wasm code.

Upvotes: 1

Views: 1482

Answers (1)

ColinE
ColinE

Reputation: 70160

I must admit, I preferred their previous summary of the technology:

WebAssembly or wasm is a new portable, size- and load-time-efficient format suitable for compilation to the web

To be specific WebAssembly is an instruction set, it looks quite like regular assembly language, with a low-level 'feel' to it. The language supports numeric types only, no strings, arrays etc ...

The WebAssembly specification also defines the virtual machine that it runs on.

To answer your questions:

what is a WebAssembly runtime?

It is a machine, or virtual machine that can execute the WebAssembly instruction set, as described by the specification. You have one in your browser!

what is a WebAssembly interpreter?

Interpreters and compilers are two different approaches to executing a language - as described here:

How does an interpreter/compiler work

what is a WebAssembly engine?

Pretty much the same as a runtime.

the host environment?

WebAssembly runtimes typically live within a host - this is because WebAssembly itself cannot perform any I/O. In order to do something useful, it works with the host environment to achieve this.

Upvotes: 2

Related Questions