Jason Yu
Jason Yu

Reputation: 2038

What's the relationship between javascript vm and WebAssembly abstract machine?

What is the relationship between javascript virtual machine and WebAssembly abstract machine?

As I know that WebAssembly directly using javascript virtual machine instead of building a new vm. But I see "WebAssembly abstract machine" on the official website, so what is the relationship between these two stuffs?

Upvotes: 0

Views: 277

Answers (1)

Andreas Rossberg
Andreas Rossberg

Reputation: 36118

A JavaScript "virtual machine" is an implementation detail of practical implementations, nothing that is defined by the language.

The WebAssembly "abstract machine" is a specification device to define the semantics of Wasm execution. It isn't an implementation but a formal concept.

At least in browsers, Wasm and JS are implemented as part of a single VM. However, standalone implementations of Wasm exist as well.

Upvotes: 2

Related Questions