SlideShare a Scribd company logo
WebAssembly – Future of the web
Guy Nesher
Web Architect @ CodeValue
Mozilla Tech Speaker
Hodash Dev Meetup
@GuyNesher
Introduction To WebAssembly
WebAssembly )WASM(
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/Blazor, enabling deployment on
the web for client and server applications.
WebAssembly Simplified
C
C++
wasm html
Compiler
+
JavaScript
Glue Fast Applications
Rust
Blazor
Etc.
Will WebAssembly Replace JavaScript
 The short answer is no
 WebAssembly complements JavaScript
 Useful for heavier processes
 But most applications do not need the extra performance
WebAssembly: Neither Web, Nor Assembly,
but Revolutionary
Jay Phelps
Let's Start At the Beginning
https://xkcd.com/1367/
Web Applications
 No Installation Process
 Cross Platform
 Safe
 But What About Performance?
JavaScript Performance – Prime Numbers
JavaScript Performance – Prime Numbers
2013 The Birth of asm.js
 Subset of JavaScript
 Compile Target for C/C++
 C/C++ -> LLVM -> Emscripten -> JavaScript
 Faster JavaScript (static typing, no garbage collection) etc.
 Still runs on old browsers (just loses some optimization)
Micosoft Demo asm.js vs js
https://bit.ly/2D72ubb
A Brief History
2013 - asm.js compiles C/C++ code to a subset of JavaScript
2015 – W3c forms the WebAssembly committee
2017 – MVP Implementation of WebAssembly in all browsers
2018 – W3C releases draft specification for WebAssembly
Web Assembly MVP
* By Lin Clark, Till Schneidereit, Luke Wagner - https://mzl.la/2TEUrej
WebAssembly MVP Games
Unreal Engine
Unity Engine
Quake
WebAssembly MVP Applications
Adobe Lightroom
Autodesk AutoCAD
WebAssembly MVP Web Applications
eBay barcode scanner – 50FPS
vs 1FPS (scans per seconds),
95% vs 20% success rate
Wordpress Gutenberg post
parser – 96% - 317% parsing
speed increase
But This Is Just The Beginning
WebAssembly Heavyweight Apps
* By Lin Clark, Till Schneidereit, Luke Wagner - https://mzl.la/2TEUrej
WebAssembly JavaScript Integration
* By Lin Clark, Till Schneidereit, Luke Wagner - https://mzl.la/2TEUrej
A Quick Intro to
WebAseembly And Rust
Wait, What’s Rust
 Developed in 2010
 Syntax similar to C++
 Memory Safe
 Used in Production by Dropbox, Yelp, NPM and many others
 The most loved programing 2016 – 2019 (according to Stack Overflow
survey)
 Use rustup - https://rustup.rs/
 Cargo – rust package manager (similar to package.json), packages are
called 'Crates'
C++ FizzBuzz Rust
int main(void)
{
int num;
for(num=1; num<101; ++num)
{
if( num%3 == 0 && num%5 == 0 ) {
printf("fizzbuzzn");
} else if( num%3 == 0) {
printf("fizzn");
} else if( num%5 == 0) {
printf("buzzn");
} else {
printf("%dn",num);
}
}
return 0;
}
FizzBuzz in Rust
fn main() {
for num in 1..101 { // Range notation!
match (num%3, num%5) { // Pattern Matching FTW!
(0, 0) => println!("fizzbuzz"),
(0, _) => println!("fizz"),
(_, 0) => println!("buzz"),
_ => println!("{}", num)
}
}
}
* By Szmozsánszky István https://mzl.la/2JIrfyA
Rust And WebAssembly
 wasm-pack – crate, simplest way to build WebAssembly
 cargo install wasm-pack
 wasm-pack build
 wasm-bindgen – crate which manages JavaScript -> WebAssembly
interaction
 Starting a new project:
 cargo new --lib <project name>
 wasm-pack build
Cargo File
[package]
name = "hello_world"
version = "0.1.0"
authors = ["Guy Nesher <nesher.guy@gmail.com>"]
edition = "2018"
[lib]
crate-type = ["cdylib"]
[dependencies]
wasm-bindgen = "0.2.42"
Wasm Webpack
const path = require("path");
const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
module.exports = {
// ...
plugins: [
new WasmPackPlugin({
crateDirectory: path.resolve(__dirname, "crate"),
}),
]
// ...
};
Rust / JavaScript Interaction
Rust Code JavaScript Code
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub extern fn add(x: u32, y: u32) -> u32 {
x + y
}
async function handleAdd(event) {
event.preventDefault();
const { add } = await import(‘../add/pkg’);
console.log(add(2, 3));
console.log(add(100, 500));
}
JavaScript Bindings
import * as wasm from './hello_world_bg';
function _assertNum(n) {
if (typeof(n) !== 'number') throw new Error('expected a number argument');
}
export function add(x, y) {
_assertNum(x);
_assertNum(y);
return wasm.add(x, y) >>> 0;
}
WebAssembly Post MVC Summary
 Fast browser applications
 Using a language of your choice
 Adopted by many large corporations
 .NET Core support using Blazor - http://tiny.cc/bvnh7y
 Or use Rust - http://tiny.cc/6znh7y
 Missing features are coming*
Guy Nesher
Web Architect @ CodeValue
Mozilla Tech Speaker
Photographer
@GuyNesher
Ad

More Related Content

What's hot (20)

WebAssembly: In a Nutshell
WebAssembly: In a NutshellWebAssembly: In a Nutshell
WebAssembly: In a Nutshell
RangHo Lee
 
Web Assembly (W3C TPAC presentation)
Web Assembly (W3C TPAC presentation)Web Assembly (W3C TPAC presentation)
Web Assembly (W3C TPAC presentation)
Kenneth Rohde Christiansen
 
Building Web Apps with WebAssembly and Blazor
Building Web Apps with WebAssembly and BlazorBuilding Web Apps with WebAssembly and Blazor
Building Web Apps with WebAssembly and Blazor
Amir Zuker
 
Web Assembly Big Picture
Web Assembly Big PictureWeb Assembly Big Picture
Web Assembly Big Picture
Yousif Shalaby
 
Docker + WASM.pdf
Docker + WASM.pdfDocker + WASM.pdf
Docker + WASM.pdf
Catalin Jora
 
Building Immutable Machine Images with Packer and Ansible
Building Immutable Machine Images with Packer and AnsibleBuilding Immutable Machine Images with Packer and Ansible
Building Immutable Machine Images with Packer and Ansible
Jason Harley
 
WebAssembly Demystified
WebAssembly DemystifiedWebAssembly Demystified
WebAssembly Demystified
Jay Phelps
 
Sysmon and Windows Event Forwarding workshop
Sysmon and Windows Event Forwarding workshopSysmon and Windows Event Forwarding workshop
Sysmon and Windows Event Forwarding workshop
Dave Willingham
 
Virtual SAN 6.2, hyper-converged infrastructure software
Virtual SAN 6.2, hyper-converged infrastructure softwareVirtual SAN 6.2, hyper-converged infrastructure software
Virtual SAN 6.2, hyper-converged infrastructure software
Duncan Epping
 
Boosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uringBoosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uring
ShapeBlue
 
Xss attack
Xss attackXss attack
Xss attack
Manjushree Mashal
 
Spring ppt
Spring pptSpring ppt
Spring ppt
Mumbai Academisc
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
tola99
 
OpenStack High Availability
OpenStack High AvailabilityOpenStack High Availability
OpenStack High Availability
Jakub Pavlik
 
Jenkins
JenkinsJenkins
Jenkins
Roger Xia
 
OpenStack Backup, Restore, DR (Freezer)
OpenStack Backup, Restore, DR (Freezer)OpenStack Backup, Restore, DR (Freezer)
OpenStack Backup, Restore, DR (Freezer)
Saad Zaher
 
Networking in Java with NIO and Netty
Networking in Java with NIO and NettyNetworking in Java with NIO and Netty
Networking in Java with NIO and Netty
Constantine Slisenka
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
Robert Reiz
 
Code obfuscation
Code obfuscationCode obfuscation
Code obfuscation
Amol Kamble
 
Web Assembly (on the server)
Web Assembly (on the server)Web Assembly (on the server)
Web Assembly (on the server)
Massimo Ferre'
 
WebAssembly: In a Nutshell
WebAssembly: In a NutshellWebAssembly: In a Nutshell
WebAssembly: In a Nutshell
RangHo Lee
 
Building Web Apps with WebAssembly and Blazor
Building Web Apps with WebAssembly and BlazorBuilding Web Apps with WebAssembly and Blazor
Building Web Apps with WebAssembly and Blazor
Amir Zuker
 
Web Assembly Big Picture
Web Assembly Big PictureWeb Assembly Big Picture
Web Assembly Big Picture
Yousif Shalaby
 
Building Immutable Machine Images with Packer and Ansible
Building Immutable Machine Images with Packer and AnsibleBuilding Immutable Machine Images with Packer and Ansible
Building Immutable Machine Images with Packer and Ansible
Jason Harley
 
WebAssembly Demystified
WebAssembly DemystifiedWebAssembly Demystified
WebAssembly Demystified
Jay Phelps
 
Sysmon and Windows Event Forwarding workshop
Sysmon and Windows Event Forwarding workshopSysmon and Windows Event Forwarding workshop
Sysmon and Windows Event Forwarding workshop
Dave Willingham
 
Virtual SAN 6.2, hyper-converged infrastructure software
Virtual SAN 6.2, hyper-converged infrastructure softwareVirtual SAN 6.2, hyper-converged infrastructure software
Virtual SAN 6.2, hyper-converged infrastructure software
Duncan Epping
 
Boosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uringBoosting I/O Performance with KVM io_uring
Boosting I/O Performance with KVM io_uring
ShapeBlue
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
tola99
 
OpenStack High Availability
OpenStack High AvailabilityOpenStack High Availability
OpenStack High Availability
Jakub Pavlik
 
OpenStack Backup, Restore, DR (Freezer)
OpenStack Backup, Restore, DR (Freezer)OpenStack Backup, Restore, DR (Freezer)
OpenStack Backup, Restore, DR (Freezer)
Saad Zaher
 
Networking in Java with NIO and Netty
Networking in Java with NIO and NettyNetworking in Java with NIO and Netty
Networking in Java with NIO and Netty
Constantine Slisenka
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
Robert Reiz
 
Code obfuscation
Code obfuscationCode obfuscation
Code obfuscation
Amol Kamble
 
Web Assembly (on the server)
Web Assembly (on the server)Web Assembly (on the server)
Web Assembly (on the server)
Massimo Ferre'
 

Similar to Web assembly - Future of the Web (20)

WebAssembly
WebAssemblyWebAssembly
WebAssembly
Jens Siebert
 
WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?
Brainhub
 
Word press workflows and gulp
Word press workflows and gulpWord press workflows and gulp
Word press workflows and gulp
Eli McMakin
 
Expanding WebAssembly.pdf
Expanding WebAssembly.pdfExpanding WebAssembly.pdf
Expanding WebAssembly.pdf
StemFunfacts
 
WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?
Alexandr Skachkov
 
Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?
Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?
Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?
OdessaJS Conf
 
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScriptJS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
JSFestUA
 
Modern Static Site with GatsbyJS
Modern Static Site with GatsbyJSModern Static Site with GatsbyJS
Modern Static Site with GatsbyJS
Riza Fahmi
 
WebAssemlby vs JavaScript
WebAssemlby vs JavaScriptWebAssemlby vs JavaScript
WebAssemlby vs JavaScript
Alexandr Skachkov
 
A glance at the Rust SWC
A glance at the Rust SWCA glance at the Rust SWC
A glance at the Rust SWC
Thien Ly
 
Into to Webassmbly
Into to WebassmblyInto to Webassmbly
Into to Webassmbly
cliffzhaobupt
 
Introduction of webpack 4
Introduction of webpack 4Introduction of webpack 4
Introduction of webpack 4
Vijay Shukla
 
Rock Solid WordPress
Rock Solid WordPressRock Solid WordPress
Rock Solid WordPress
Erik Osterman
 
Always on! Or not?
Always on! Or not?Always on! Or not?
Always on! Or not?
Carsten Sandtner
 
Web assembly with PWA
Web assembly with PWA Web assembly with PWA
Web assembly with PWA
Shashank Sharma
 
Quick overview of WebAssembly
Quick overview of WebAssemblyQuick overview of WebAssembly
Quick overview of WebAssembly
Karl Ritchie
 
Gatsby (Code.Talks) 2019
Gatsby (Code.Talks) 2019Gatsby (Code.Talks) 2019
Gatsby (Code.Talks) 2019
Stefan Adolf
 
"Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R...
"Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R..."Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R...
"Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R...
Fwdays
 
(In)Security Implication in the JS Universe
(In)Security Implication in the JS Universe(In)Security Implication in the JS Universe
(In)Security Implication in the JS Universe
Stefano Di Paola
 
DevOps and Hybrid Applications: What You Need to Know
DevOps and Hybrid Applications: What You Need to KnowDevOps and Hybrid Applications: What You Need to Know
DevOps and Hybrid Applications: What You Need to Know
DevOps.com
 
WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?WebAssembly - czy dzisiaj mi się to przyda do pracy?
WebAssembly - czy dzisiaj mi się to przyda do pracy?
Brainhub
 
Word press workflows and gulp
Word press workflows and gulpWord press workflows and gulp
Word press workflows and gulp
Eli McMakin
 
Expanding WebAssembly.pdf
Expanding WebAssembly.pdfExpanding WebAssembly.pdf
Expanding WebAssembly.pdf
StemFunfacts
 
WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?
Alexandr Skachkov
 
Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?
Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?
Oleksandr Skachkov - WebAssembly vs JavaScript: What is faster?
OdessaJS Conf
 
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScriptJS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
JSFestUA
 
Modern Static Site with GatsbyJS
Modern Static Site with GatsbyJSModern Static Site with GatsbyJS
Modern Static Site with GatsbyJS
Riza Fahmi
 
A glance at the Rust SWC
A glance at the Rust SWCA glance at the Rust SWC
A glance at the Rust SWC
Thien Ly
 
Introduction of webpack 4
Introduction of webpack 4Introduction of webpack 4
Introduction of webpack 4
Vijay Shukla
 
Rock Solid WordPress
Rock Solid WordPressRock Solid WordPress
Rock Solid WordPress
Erik Osterman
 
Quick overview of WebAssembly
Quick overview of WebAssemblyQuick overview of WebAssembly
Quick overview of WebAssembly
Karl Ritchie
 
Gatsby (Code.Talks) 2019
Gatsby (Code.Talks) 2019Gatsby (Code.Talks) 2019
Gatsby (Code.Talks) 2019
Stefan Adolf
 
"Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R...
"Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R..."Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R...
"Hidden difficulties of debugger implementation for .NET WASM apps", Andrii R...
Fwdays
 
(In)Security Implication in the JS Universe
(In)Security Implication in the JS Universe(In)Security Implication in the JS Universe
(In)Security Implication in the JS Universe
Stefano Di Paola
 
DevOps and Hybrid Applications: What You Need to Know
DevOps and Hybrid Applications: What You Need to KnowDevOps and Hybrid Applications: What You Need to Know
DevOps and Hybrid Applications: What You Need to Know
DevOps.com
 
Ad

More from CodeValue (20)

Digital transformation buzzword or reality - Alon Fliess
Digital transformation buzzword or reality - Alon FliessDigital transformation buzzword or reality - Alon Fliess
Digital transformation buzzword or reality - Alon Fliess
CodeValue
 
The IDF's journey to the cloud - Merav
The IDF's journey to the cloud - MeravThe IDF's journey to the cloud - Merav
The IDF's journey to the cloud - Merav
CodeValue
 
When your release plan is concluded at the HR office - Hanan Zakai
When your release plan is concluded at the HR office - Hanan  ZakaiWhen your release plan is concluded at the HR office - Hanan  Zakai
When your release plan is concluded at the HR office - Hanan Zakai
CodeValue
 
We come in peace hybrid development with web assembly - Maayan Hanin
We come in peace hybrid development with web assembly - Maayan HaninWe come in peace hybrid development with web assembly - Maayan Hanin
We come in peace hybrid development with web assembly - Maayan Hanin
CodeValue
 
The IoT Transformation and What it Means to You - Nir Dobovizky
The IoT Transformation and What it Means to You - Nir DobovizkyThe IoT Transformation and What it Means to You - Nir Dobovizky
The IoT Transformation and What it Means to You - Nir Dobovizky
CodeValue
 
State in stateless serverless functions - Alex Pshul
State in stateless serverless functions - Alex PshulState in stateless serverless functions - Alex Pshul
State in stateless serverless functions - Alex Pshul
CodeValue
 
Will the Real Public API Please Stand Up? Amir Zuker
Will the Real Public API Please Stand Up? Amir ZukerWill the Real Public API Please Stand Up? Amir Zuker
Will the Real Public API Please Stand Up? Amir Zuker
CodeValue
 
How I built a ml human hybrid workflow using computer vision - Amir Shitrit
How I built a ml human hybrid workflow using computer vision - Amir ShitritHow I built a ml human hybrid workflow using computer vision - Amir Shitrit
How I built a ml human hybrid workflow using computer vision - Amir Shitrit
CodeValue
 
Application evolution strategy - Eran Stiller
Application evolution strategy - Eran StillerApplication evolution strategy - Eran Stiller
Application evolution strategy - Eran Stiller
CodeValue
 
Designing products in the digital transformation era - Eyal Livne
Designing products in the digital transformation era - Eyal LivneDesigning products in the digital transformation era - Eyal Livne
Designing products in the digital transformation era - Eyal Livne
CodeValue
 
Eerez Pedro: Product thinking 101 - Architecture Next
Eerez Pedro: Product thinking 101 - Architecture NextEerez Pedro: Product thinking 101 - Architecture Next
Eerez Pedro: Product thinking 101 - Architecture Next
CodeValue
 
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
CodeValue
 
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
CodeValue
 
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...Magnus Mårtensson: The Cloud challenge is more than just technical – people a...
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...
CodeValue
 
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
CodeValue
 
Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20
CodeValue
 
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
CodeValue
 
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
CodeValue
 
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20
Moaid Hathot: Dapr  the glue to your microservices - Architecture Next 20Moaid Hathot: Dapr  the glue to your microservices - Architecture Next 20
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20
CodeValue
 
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20
CodeValue
 
Digital transformation buzzword or reality - Alon Fliess
Digital transformation buzzword or reality - Alon FliessDigital transformation buzzword or reality - Alon Fliess
Digital transformation buzzword or reality - Alon Fliess
CodeValue
 
The IDF's journey to the cloud - Merav
The IDF's journey to the cloud - MeravThe IDF's journey to the cloud - Merav
The IDF's journey to the cloud - Merav
CodeValue
 
When your release plan is concluded at the HR office - Hanan Zakai
When your release plan is concluded at the HR office - Hanan  ZakaiWhen your release plan is concluded at the HR office - Hanan  Zakai
When your release plan is concluded at the HR office - Hanan Zakai
CodeValue
 
We come in peace hybrid development with web assembly - Maayan Hanin
We come in peace hybrid development with web assembly - Maayan HaninWe come in peace hybrid development with web assembly - Maayan Hanin
We come in peace hybrid development with web assembly - Maayan Hanin
CodeValue
 
The IoT Transformation and What it Means to You - Nir Dobovizky
The IoT Transformation and What it Means to You - Nir DobovizkyThe IoT Transformation and What it Means to You - Nir Dobovizky
The IoT Transformation and What it Means to You - Nir Dobovizky
CodeValue
 
State in stateless serverless functions - Alex Pshul
State in stateless serverless functions - Alex PshulState in stateless serverless functions - Alex Pshul
State in stateless serverless functions - Alex Pshul
CodeValue
 
Will the Real Public API Please Stand Up? Amir Zuker
Will the Real Public API Please Stand Up? Amir ZukerWill the Real Public API Please Stand Up? Amir Zuker
Will the Real Public API Please Stand Up? Amir Zuker
CodeValue
 
How I built a ml human hybrid workflow using computer vision - Amir Shitrit
How I built a ml human hybrid workflow using computer vision - Amir ShitritHow I built a ml human hybrid workflow using computer vision - Amir Shitrit
How I built a ml human hybrid workflow using computer vision - Amir Shitrit
CodeValue
 
Application evolution strategy - Eran Stiller
Application evolution strategy - Eran StillerApplication evolution strategy - Eran Stiller
Application evolution strategy - Eran Stiller
CodeValue
 
Designing products in the digital transformation era - Eyal Livne
Designing products in the digital transformation era - Eyal LivneDesigning products in the digital transformation era - Eyal Livne
Designing products in the digital transformation era - Eyal Livne
CodeValue
 
Eerez Pedro: Product thinking 101 - Architecture Next
Eerez Pedro: Product thinking 101 - Architecture NextEerez Pedro: Product thinking 101 - Architecture Next
Eerez Pedro: Product thinking 101 - Architecture Next
CodeValue
 
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
CodeValue
 
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
Amir Zuker: Building web apps with web assembly and blazor - Architecture Nex...
CodeValue
 
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...Magnus Mårtensson: The Cloud challenge is more than just technical – people a...
Magnus Mårtensson: The Cloud challenge is more than just technical – people a...
CodeValue
 
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
Nir Doboviski: In Space No One Can Hear Microservices Scream – a Microservice...
CodeValue
 
Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20
CodeValue
 
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
Vitali zaidman Do You Need Server Side Rendering? What Are The Alternatives?
CodeValue
 
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
Ronen Levinson: Unified policy enforcement with opa - Architecture Next 20
CodeValue
 
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20
Moaid Hathot: Dapr  the glue to your microservices - Architecture Next 20Moaid Hathot: Dapr  the glue to your microservices - Architecture Next 20
Moaid Hathot: Dapr the glue to your microservices - Architecture Next 20
CodeValue
 
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20
Eyal Ellenbogen: Building a UI Foundation for Scalability - Architecture Next 20
CodeValue
 
Ad

Recently uploaded (20)

Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Kubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptxKubernetes_101_Zero_to_Platform_Engineer.pptx
Kubernetes_101_Zero_to_Platform_Engineer.pptx
CloudScouts
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AIScaling GraphRAG:  Efficient Knowledge Retrieval for Enterprise AI
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AI
danshalev
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Maxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINKMaxon CINEMA 4D 2025 Crack FREE Download LINK
Maxon CINEMA 4D 2025 Crack FREE Download LINK
younisnoman75
 
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdfMicrosoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
Microsoft AI Nonprofit Use Cases and Live Demo_2025.04.30.pdf
TechSoup
 

Web assembly - Future of the Web

  • 1. WebAssembly – Future of the web Guy Nesher Web Architect @ CodeValue Mozilla Tech Speaker Hodash Dev Meetup @GuyNesher
  • 3. WebAssembly )WASM( 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/Blazor, enabling deployment on the web for client and server applications.
  • 5. Will WebAssembly Replace JavaScript  The short answer is no  WebAssembly complements JavaScript  Useful for heavier processes  But most applications do not need the extra performance
  • 6. WebAssembly: Neither Web, Nor Assembly, but Revolutionary Jay Phelps
  • 7. Let's Start At the Beginning https://xkcd.com/1367/
  • 8. Web Applications  No Installation Process  Cross Platform  Safe  But What About Performance?
  • 10. JavaScript Performance – Prime Numbers
  • 11. 2013 The Birth of asm.js  Subset of JavaScript  Compile Target for C/C++  C/C++ -> LLVM -> Emscripten -> JavaScript  Faster JavaScript (static typing, no garbage collection) etc.  Still runs on old browsers (just loses some optimization)
  • 12. Micosoft Demo asm.js vs js https://bit.ly/2D72ubb
  • 13. A Brief History 2013 - asm.js compiles C/C++ code to a subset of JavaScript 2015 – W3c forms the WebAssembly committee 2017 – MVP Implementation of WebAssembly in all browsers 2018 – W3C releases draft specification for WebAssembly
  • 14. Web Assembly MVP * By Lin Clark, Till Schneidereit, Luke Wagner - https://mzl.la/2TEUrej
  • 15. WebAssembly MVP Games Unreal Engine Unity Engine Quake
  • 16. WebAssembly MVP Applications Adobe Lightroom Autodesk AutoCAD
  • 17. WebAssembly MVP Web Applications eBay barcode scanner – 50FPS vs 1FPS (scans per seconds), 95% vs 20% success rate Wordpress Gutenberg post parser – 96% - 317% parsing speed increase
  • 18. But This Is Just The Beginning
  • 19. WebAssembly Heavyweight Apps * By Lin Clark, Till Schneidereit, Luke Wagner - https://mzl.la/2TEUrej
  • 20. WebAssembly JavaScript Integration * By Lin Clark, Till Schneidereit, Luke Wagner - https://mzl.la/2TEUrej
  • 21. A Quick Intro to WebAseembly And Rust
  • 22. Wait, What’s Rust  Developed in 2010  Syntax similar to C++  Memory Safe  Used in Production by Dropbox, Yelp, NPM and many others  The most loved programing 2016 – 2019 (according to Stack Overflow survey)  Use rustup - https://rustup.rs/  Cargo – rust package manager (similar to package.json), packages are called 'Crates'
  • 23. C++ FizzBuzz Rust int main(void) { int num; for(num=1; num<101; ++num) { if( num%3 == 0 && num%5 == 0 ) { printf("fizzbuzzn"); } else if( num%3 == 0) { printf("fizzn"); } else if( num%5 == 0) { printf("buzzn"); } else { printf("%dn",num); } } return 0; }
  • 24. FizzBuzz in Rust fn main() { for num in 1..101 { // Range notation! match (num%3, num%5) { // Pattern Matching FTW! (0, 0) => println!("fizzbuzz"), (0, _) => println!("fizz"), (_, 0) => println!("buzz"), _ => println!("{}", num) } } } * By Szmozsánszky István https://mzl.la/2JIrfyA
  • 25. Rust And WebAssembly  wasm-pack – crate, simplest way to build WebAssembly  cargo install wasm-pack  wasm-pack build  wasm-bindgen – crate which manages JavaScript -> WebAssembly interaction  Starting a new project:  cargo new --lib <project name>  wasm-pack build
  • 26. Cargo File [package] name = "hello_world" version = "0.1.0" authors = ["Guy Nesher <[email protected]>"] edition = "2018" [lib] crate-type = ["cdylib"] [dependencies] wasm-bindgen = "0.2.42"
  • 27. Wasm Webpack const path = require("path"); const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin"); module.exports = { // ... plugins: [ new WasmPackPlugin({ crateDirectory: path.resolve(__dirname, "crate"), }), ] // ... };
  • 28. Rust / JavaScript Interaction Rust Code JavaScript Code use wasm_bindgen::prelude::*; #[wasm_bindgen] pub extern fn add(x: u32, y: u32) -> u32 { x + y } async function handleAdd(event) { event.preventDefault(); const { add } = await import(‘../add/pkg’); console.log(add(2, 3)); console.log(add(100, 500)); }
  • 29. JavaScript Bindings import * as wasm from './hello_world_bg'; function _assertNum(n) { if (typeof(n) !== 'number') throw new Error('expected a number argument'); } export function add(x, y) { _assertNum(x); _assertNum(y); return wasm.add(x, y) >>> 0; }
  • 30. WebAssembly Post MVC Summary  Fast browser applications  Using a language of your choice  Adopted by many large corporations  .NET Core support using Blazor - http://tiny.cc/bvnh7y  Or use Rust - http://tiny.cc/6znh7y  Missing features are coming*
  • 31. Guy Nesher Web Architect @ CodeValue Mozilla Tech Speaker Photographer @GuyNesher

Editor's Notes

  • #4: Sounds good? Notice how it doesn't mention it's a language? 
  • #7: Jay Phelps
  • #8: And not really for what you think of as traditional "web"
  • #9: No installation – reduce drop in sales, easier for corporations Cross Platform – Windows Phone, KaiOS & feature phones Safe – sandboxed, we aren’t afraid to browse sites
  • #11: Great improvements but there’s still a visible performance gap
  • #12: LLVM compiler, Emscripten
  • #14: Draft Specifications lets browser vendors to start playing around with different solutions Fast adaptation
  • #15: Linear memory – untyped array of bytes. Sandboxed Fast execution – 10% slower than native code, 20× faster parsing Compact – binary around 20% smaller
  • #20: Threading – delay due to Spectre security SIMD – Single instruction, multiple data – under active development 64-bit – general idea how to implement Loat Time improvements – Streaming Compilation, Tired Compilation, Implicit HTTP Caching
  • #21: Fast calls – 2017, minimal support. Already implemented in most browsers Data Exchange – WebAssembly supports only numbers, interaction via serialization to linear memory Proposal Module Integration – Module integration with JS Proposal Toolchain Integration - webpack Plugin wasm-pack Backward compatibility - wasm2js
  • #26: There are many tutorials using older build methods, they can be very confusing be aware
  • #29: Prelude – loads everything from wasm_bindgen prelude module #[wasm_bindgen] adds some JavaScript glue code await import engine is meant to compile while downloading