SlideShare ist ein Scribd-Unternehmen logo
1 von 19
WebAssembly (WASM)
An Introduction
April 1, 2017
Brad Beiermann
The winner is... #3
The new logo was selected in February 2017 in a design contest
https://github.com/WebAssembly/design/issues/980
What is WebAssembly?
WebAssembly is a portable byte code format that has become available to the major
browsers by Google, Microsoft, Mozilla and Apple.
History
June 2015 - WebAssembly was first announced.
March 2016 - Google, Microsoft, Mozilla preview WebAssembly in their
browsers.
October 2016 – WebAssembly becomes a binary release candidate.
March 2017 – Begins to be shipped on-by-default in browsers.
Links of Interest:
http://webassembly.org/
https://github.com/WebAssembly
https://www.w3.org/community/webassembly/
Why would I need WebAssembly?
• For those of you have been looking to get binary level
support across the entire web platform stack,
WebAssembly is your ticket.
• WebAssembly is actually a binary AST format by
default.
• It is quite a departure from the payload restraints of
JavaScript.
The Binary Beat
• AST- Abstract Syntax Tree.
• In a compiler the AST keeps source location information
and some typing information.
• WebAssembly code essentially gets compiled to binary
AST from languages like C, Haskell, or C++ in the
browser.
The Advantage
• The power is being able to use other languages to compile a binary file to be
handled within the browser.
• In WASM, you can author and debug in a text format so it’s readable. We are
talking a new low-level language in the spirit of something like assembly
language.
Assembly Language?...Ugh! :-(
...but, doesn't asm.js do this today?
• A snippet of some asm.js code.
• asm.js is a low-level subset of javascript. It appears to be direct memory register
access, but it is still being parsed by JavaScript.
• You still have all that payload overhead
• WebAssembly is bypassing all that by directly using the AST in a binary format.
JavaScript's Bottleneck
• JavaScript has quite a few restrictions in it’s flexibility (ie. Payload,..etc.)
• WASM works at the bare metal memory layer in the browser.
• Think about expressing things directly to threads and SIMD.
• WASM is filling in the holes left by JavaScript in terms of controlling bit/byte level
memory register control.
• You simply cannot get to that low-level with JavaScript or any other popular
library/framework in JavaScript like REACT, Angular, Embers, Vue,...etc.
BUT, one excitement around WASM is...
Other languages running in the browser!
"A user can compile a program of a high-level language to WebAssembly and run it
in a browser. As a first step, in the minimal viable product, the goal was to ensure
that a C/C++ program could be compiled to WebAssembly and run within the
browser."
B. Abhijith Chatra,
Sr. Software Engineer at Microsoft
Co-chairman of WASM community group
Up Next: Browser Compilers & Browser VMs
• They also want it to enable other programming
languages to compile efficiently to the Web.
• Again, WASM is giving you a binary executable format to
make this happen
• WebAssembly will feature a memory-safe, sandboxed
execution environment. It would access browser
functionality through the same Web APIs accessible
from JavaScript.
For WebAssembly to succeed we need two things:
1. Browsers to support WebAssembly natively
2. Compilers that emit WebAssembly. There are
already several out: LLVM, ilwasm, Binaryen
(written in C++), asm2wasm, Emscripten
Compiling a WASM Program
Step #1: Get the Emscripten Compiler and Emscripten SDK
Step #2: Enter the Emscripten compiler environment in the current
command line prompt type
Compiling a WASM Program (continued)
Step #3: Create a simple “hello world” program and compile it. The
compilation step is the last line.
Step #4: We can use the emrun web server provided with the
Emscripten SDK:
Online demo of a WASM compiler
Cross Browser Demo of Tanks (FUN!)
Some Online Demos of WASM Running
https://kripken.github.io/talks/wasm.html#/11
http://webassembly.org/demo/
What about mobile with WASM?
Where is WASM first headed?
"Rather than kill JavaScript, which is not feasible, what [we're] trying to do is respond to
real engineering problems that we’ve had with ASM.js. Loading a big game from Epic or
Unity can take 20 - 30 seconds. That’s too long. With a compressed abstract syntax tree
encoding that’s 20 times faster, just a couple seconds, that’s what you want. So there’s a
real reason for WASM, and it is a valid reason."
Brendan Eich
Author of JavaScript
WebAssembly WASM Introduction Presentation

Weitere ähnliche Inhalte

Was ist angesagt?

Intro to Asynchronous Javascript
Intro to Asynchronous JavascriptIntro to Asynchronous Javascript
Intro to Asynchronous JavascriptGarrett Welson
 
Web assembly: a brief overview
Web assembly: a brief overviewWeb assembly: a brief overview
Web assembly: a brief overviewPavlo Iatsiuk
 
gRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at SquaregRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at SquareApigee | Google Cloud
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOPDzmitry Naskou
 
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 NutshellRangHo Lee
 
An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)Folio3 Software
 
The New JavaScript: ES6
The New JavaScript: ES6The New JavaScript: ES6
The New JavaScript: ES6Rob Eisenberg
 
How to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkHow to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkRapidValue
 
Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction Kanika Gera
 
Asynchronous javascript
 Asynchronous javascript Asynchronous javascript
Asynchronous javascriptEman Mohamed
 

Was ist angesagt? (20)

Rxjs ngvikings
Rxjs ngvikingsRxjs ngvikings
Rxjs ngvikings
 
Intro to Asynchronous Javascript
Intro to Asynchronous JavascriptIntro to Asynchronous Javascript
Intro to Asynchronous Javascript
 
Web assembly: a brief overview
Web assembly: a brief overviewWeb assembly: a brief overview
Web assembly: a brief overview
 
gRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at SquaregRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at Square
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
Web Assembly (on the server)
Web Assembly (on the server)Web Assembly (on the server)
Web Assembly (on the server)
 
WebAssembly: In a Nutshell
WebAssembly: In a NutshellWebAssembly: In a Nutshell
WebAssembly: In a Nutshell
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 
DevSecOps Jenkins Pipeline -Security
DevSecOps Jenkins Pipeline -SecurityDevSecOps Jenkins Pipeline -Security
DevSecOps Jenkins Pipeline -Security
 
An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)An Introduction to CSS Preprocessors (SASS & LESS)
An Introduction to CSS Preprocessors (SASS & LESS)
 
Tomcat
TomcatTomcat
Tomcat
 
The New JavaScript: ES6
The New JavaScript: ES6The New JavaScript: ES6
The New JavaScript: ES6
 
JavaScript Promises
JavaScript PromisesJavaScript Promises
JavaScript Promises
 
Javascript
JavascriptJavascript
Javascript
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
How to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular FrameworkHow to Implement Micro Frontend Architecture using Angular Framework
How to Implement Micro Frontend Architecture using Angular Framework
 
Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction Node.Js: Basics Concepts and Introduction
Node.Js: Basics Concepts and Introduction
 
Asynchronous javascript
 Asynchronous javascript Asynchronous javascript
Asynchronous javascript
 
React Native
React NativeReact Native
React Native
 

Ähnlich wie WebAssembly WASM Introduction Presentation

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
 
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScriptJS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScriptJSFestUA
 
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
 
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
 
WebAssembly and .NET
WebAssembly and .NETWebAssembly and .NET
WebAssembly and .NETJoanna Lamch
 
Quick overview of WebAssembly
Quick overview of WebAssemblyQuick overview of WebAssembly
Quick overview of WebAssemblyKarl Ritchie
 
Web assembly with go
Web assembly with goWeb assembly with go
Web assembly with goWangChow1
 
Past, present, and future of web assembly - Devfest Nantes 2017
Past, present, and future of web assembly - Devfest Nantes 2017Past, present, and future of web assembly - Devfest Nantes 2017
Past, present, and future of web assembly - Devfest Nantes 2017Alexandre Morgaut
 
Oleksandr Skachkov "How to run WebAssembly in your React web application"
Oleksandr Skachkov "How to run WebAssembly in your React web application"Oleksandr Skachkov "How to run WebAssembly in your React web application"
Oleksandr Skachkov "How to run WebAssembly in your React web application"Fwdays
 
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"Fwdays
 
WebAssembly - kolejny buzzword, czy (r)ewolucja?
WebAssembly - kolejny buzzword, czy (r)ewolucja?WebAssembly - kolejny buzzword, czy (r)ewolucja?
WebAssembly - kolejny buzzword, czy (r)ewolucja?Brainhub
 

Ähnlich wie WebAssembly WASM Introduction Presentation (20)

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?
 
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScriptJS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
JS Fest 2018. Александр Скачков. WebAssembly vs JavaScript
 
Into to Webassmbly
Into to WebassmblyInto to Webassmbly
Into to Webassmbly
 
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?
 
WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?
 
WebAssemlby vs JavaScript
WebAssemlby vs JavaScriptWebAssemlby vs JavaScript
WebAssemlby vs JavaScript
 
WebAssembly and .NET
WebAssembly and .NETWebAssembly and .NET
WebAssembly and .NET
 
WebAssembly
WebAssemblyWebAssembly
WebAssembly
 
Quick overview of WebAssembly
Quick overview of WebAssemblyQuick overview of WebAssembly
Quick overview of WebAssembly
 
Web assembly with go
Web assembly with goWeb assembly with go
Web assembly with go
 
The shift to the edge
The shift to the edgeThe shift to the edge
The shift to the edge
 
The shift to the edge
The shift to the edgeThe shift to the edge
The shift to the edge
 
Blazor v1.1
Blazor v1.1Blazor v1.1
Blazor v1.1
 
Past, present, and future of web assembly - Devfest Nantes 2017
Past, present, and future of web assembly - Devfest Nantes 2017Past, present, and future of web assembly - Devfest Nantes 2017
Past, present, and future of web assembly - Devfest Nantes 2017
 
Oleksandr Skachkov "How to run WebAssembly in your React web application"
Oleksandr Skachkov "How to run WebAssembly in your React web application"Oleksandr Skachkov "How to run WebAssembly in your React web application"
Oleksandr Skachkov "How to run WebAssembly in your React web application"
 
DevDay 2018 - Blazor
DevDay 2018 - BlazorDevDay 2018 - Blazor
DevDay 2018 - Blazor
 
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
Oleksandr Skachkov "Running С# in your Web Browser with WebAssembly"
 
WebAssembly - kolejny buzzword, czy (r)ewolucja?
WebAssembly - kolejny buzzword, czy (r)ewolucja?WebAssembly - kolejny buzzword, czy (r)ewolucja?
WebAssembly - kolejny buzzword, czy (r)ewolucja?
 
Asm.js introduction
Asm.js introductionAsm.js introduction
Asm.js introduction
 
A Robust and Flexible Operating System Compatibility Architecture
A Robust and Flexible Operating System Compatibility ArchitectureA Robust and Flexible Operating System Compatibility Architecture
A Robust and Flexible Operating System Compatibility Architecture
 

Kürzlich hochgeladen

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 

Kürzlich hochgeladen (20)

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 

WebAssembly WASM Introduction Presentation

  • 2. The winner is... #3 The new logo was selected in February 2017 in a design contest https://github.com/WebAssembly/design/issues/980
  • 3. What is WebAssembly? WebAssembly is a portable byte code format that has become available to the major browsers by Google, Microsoft, Mozilla and Apple.
  • 4. History June 2015 - WebAssembly was first announced. March 2016 - Google, Microsoft, Mozilla preview WebAssembly in their browsers. October 2016 – WebAssembly becomes a binary release candidate. March 2017 – Begins to be shipped on-by-default in browsers. Links of Interest: http://webassembly.org/ https://github.com/WebAssembly https://www.w3.org/community/webassembly/
  • 5. Why would I need WebAssembly? • For those of you have been looking to get binary level support across the entire web platform stack, WebAssembly is your ticket. • WebAssembly is actually a binary AST format by default. • It is quite a departure from the payload restraints of JavaScript.
  • 6. The Binary Beat • AST- Abstract Syntax Tree. • In a compiler the AST keeps source location information and some typing information. • WebAssembly code essentially gets compiled to binary AST from languages like C, Haskell, or C++ in the browser.
  • 7. The Advantage • The power is being able to use other languages to compile a binary file to be handled within the browser. • In WASM, you can author and debug in a text format so it’s readable. We are talking a new low-level language in the spirit of something like assembly language.
  • 9. ...but, doesn't asm.js do this today? • A snippet of some asm.js code. • asm.js is a low-level subset of javascript. It appears to be direct memory register access, but it is still being parsed by JavaScript. • You still have all that payload overhead • WebAssembly is bypassing all that by directly using the AST in a binary format.
  • 10. JavaScript's Bottleneck • JavaScript has quite a few restrictions in it’s flexibility (ie. Payload,..etc.) • WASM works at the bare metal memory layer in the browser. • Think about expressing things directly to threads and SIMD. • WASM is filling in the holes left by JavaScript in terms of controlling bit/byte level memory register control. • You simply cannot get to that low-level with JavaScript or any other popular library/framework in JavaScript like REACT, Angular, Embers, Vue,...etc. BUT, one excitement around WASM is...
  • 11. Other languages running in the browser! "A user can compile a program of a high-level language to WebAssembly and run it in a browser. As a first step, in the minimal viable product, the goal was to ensure that a C/C++ program could be compiled to WebAssembly and run within the browser." B. Abhijith Chatra, Sr. Software Engineer at Microsoft Co-chairman of WASM community group
  • 12. Up Next: Browser Compilers & Browser VMs • They also want it to enable other programming languages to compile efficiently to the Web. • Again, WASM is giving you a binary executable format to make this happen • WebAssembly will feature a memory-safe, sandboxed execution environment. It would access browser functionality through the same Web APIs accessible from JavaScript.
  • 13. For WebAssembly to succeed we need two things: 1. Browsers to support WebAssembly natively 2. Compilers that emit WebAssembly. There are already several out: LLVM, ilwasm, Binaryen (written in C++), asm2wasm, Emscripten
  • 14. Compiling a WASM Program Step #1: Get the Emscripten Compiler and Emscripten SDK Step #2: Enter the Emscripten compiler environment in the current command line prompt type
  • 15. Compiling a WASM Program (continued) Step #3: Create a simple “hello world” program and compile it. The compilation step is the last line. Step #4: We can use the emrun web server provided with the Emscripten SDK:
  • 16. Online demo of a WASM compiler Cross Browser Demo of Tanks (FUN!) Some Online Demos of WASM Running https://kripken.github.io/talks/wasm.html#/11 http://webassembly.org/demo/
  • 17. What about mobile with WASM?
  • 18. Where is WASM first headed? "Rather than kill JavaScript, which is not feasible, what [we're] trying to do is respond to real engineering problems that we’ve had with ASM.js. Loading a big game from Epic or Unity can take 20 - 30 seconds. That’s too long. With a compressed abstract syntax tree encoding that’s 20 times faster, just a couple seconds, that’s what you want. So there’s a real reason for WASM, and it is a valid reason." Brendan Eich Author of JavaScript