Quick introduction to WebAssembly

What’s this new low-level code ?

Wasm is a virtual instruction set architecture (V-ISA). It has a binary instructions format like assembly code. The file extension for binary format is «.wasm». Wasm define also a text format which is equivalent to binary format, but readable and editable by humans. This format is also used in browsers when debugging code. The text format extension is «.wat».

WAT syntaxe vs WASM syntaxe

Why Wasm can be Fast as native code ?

Binary instructions are compact and fast to transmit inside the browser. The compilation from wasm instructions into real machine code don’t take a lot of time like classical web language such as javascript.

WebAssembly instructions to Machine code

What does it mean Target compilation ?

Wasm is a compilation target for high-level languages, means that you don’t need to write wasm code by yourself. There are many softwares program that transforms high-level source code written in C/C++, Python, Rust, and C# into wasm. For exemple Emscripten is famous to compile C/C++ into WebAssembly. to have an idea, take a look on this website : https://github.com/appcypher/awesome-wasm-langs

Resources :

--

--

Senior Full Stack .Net / Angular Developer, Cloud & Azure DevOps, Carrier Manager, Husband, and Father.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abdelmajid BACO

Abdelmajid BACO

75 Followers

Senior Full Stack .Net / Angular Developer, Cloud & Azure DevOps, Carrier Manager, Husband, and Father.