WebAssembly- Key Concepts
WebAssembly is basically a byte code that can be generated from various languages and then be compiled by the browser, in native speed.
For example: take a simple C program, compile it into a byte code written for a WASM virtual machine.
WASM- Web Assembly State Machine. This WASM virtual machine is very small, very portable and implemented in all major web browsers.
The main key concepts are as below:
A module in WebAssembly regards an object that is compiled by the browser to an executable machine code. In other words- the .wasm file. A module can be shared between windows and also web workers.
Memory in WebAssembly means an arraybuffer which holds data for your program.
Table in WebAssembly is a typed array which is outside the WebAssembly memory and mostly has a reference to functions. Meaning, it stores all memory addresses of functions.
After writing the source code, when compiling it- a binary WASM file will be created. This file needs to be included in the project.
For better understanding, get started in writing your first WASM file.