Web Assembly is a new web standard that defines a binary format for executable code in web pages. It is meant to enable executing code nearly as quickly as native machine code. Web Assembly allows other languages like C/C++ to be compiled to run in the browser. It has performance gains over JavaScript due to execution speed and smaller file sizes. Major browsers now support Web Assembly, allowing its use without plugins. Common use cases include games, media editing, peer-to-peer apps, and scientific/CAD applications.
Agenda:
1. Past andCurrent Web clientTechnologies
2. What IsWeb Assembly?
3. Is It JavaScript Replacement?
4. Web Assembly History
5. WhyWeb Assembly?
6. How ItWorks ?
7. HowTo BuildWebAssembly ?
8. Example Of Sites UsesWeb Assembly
2-WebAssembly is:
• WebAssemblyis a web standard that defines a binary format and a
corresponding assembly-like text format for executable code inWeb
pages. It is meant to enable executing code nearly as quickly as
running native machine code. => . Wikipedia
• WebAssembly (abbreviated Wasm) is a binary instruction format for a
stack-based virtual machine.Wasm is designed as a portable target
for compilation of high-level languages like C/C++/Rust, enabling
deployment on the web for client and server applications. https://webassembly.org/
4- Web AssemblyHistory
June 2015 :
First
Announced
March 2016:
Definition of
core features
October 2016 :
Browser MVP
preview
Jan.2017 : Logo
Choosen
August :2017
:W3CWeb
Assembly
Working
Group
Feb.2018: W3c
Specification
draft
10.
5. Why WebAssembly?
• Other Language Can compiled toWeb Assembly
• Performance gains (Execution and file size)
• Supported by all Major Browsers
• Use of JS runtime without need for plugins
• Secure
6-How It Works?
Load
Run(Params)
Call Functions
JavaScript Runtime
13.
7-How To BuildWeb Assembly ?
• Using Online Studio https://webassembly.studio/
Main.wat
Main.wasm
Convert
14.
7-How To BuildWeb Assembly ?(Cont.)
• Compile other language Code toWASM
• C++
• C#
C++ Compile
Emscripten toolchain
runtime
C#/Razor Compile DLL
runtime
Run Mono.wasm
Microsoft BlazorToolchain
15.
7-How To BuildWeb Assembly ?(Cont.)
• Using existing WebAssembly in JS