SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Introduction to webassembly
Introduction to webassemblyIntroduction to webassembly
Introduction to webassemblyGabriele Falasca
 
Web assembly overview by Mikhail Sorokovsky
Web assembly overview by Mikhail SorokovskyWeb assembly overview by Mikhail Sorokovsky
Web assembly overview by Mikhail SorokovskyValeriia Maliarenko
 
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
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack IntroductionAnjali Chawla
 
Introduction to Node JS.pdf
Introduction to Node JS.pdfIntroduction to Node JS.pdf
Introduction to Node JS.pdfBareen Shaikh
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation洪 鹏发
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansibleKhizer Naeem
 
Basics of Vue.js 2019
Basics of Vue.js 2019Basics of Vue.js 2019
Basics of Vue.js 2019Paul Bele
 
What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...Edureka!
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with AnsibleRayed Alrashed
 
Ansible roles done right
Ansible roles done rightAnsible roles done right
Ansible roles done rightDan Vaida
 

Tendances (20)

Introduction to webassembly
Introduction to webassemblyIntroduction to webassembly
Introduction to webassembly
 
Web assembly overview by Mikhail Sorokovsky
Web assembly overview by Mikhail SorokovskyWeb assembly overview by Mikhail Sorokovsky
Web assembly overview by Mikhail Sorokovsky
 
Web Assembly (on the server)
Web Assembly (on the server)Web Assembly (on the server)
Web Assembly (on the server)
 
NodeJS for Beginner
NodeJS for BeginnerNodeJS for Beginner
NodeJS for Beginner
 
WebAssembly: In a Nutshell
WebAssembly: In a NutshellWebAssembly: In a Nutshell
WebAssembly: In a Nutshell
 
Webpack Introduction
Webpack IntroductionWebpack Introduction
Webpack Introduction
 
Angular
AngularAngular
Angular
 
Introduction to Node JS.pdf
Introduction to Node JS.pdfIntroduction to Node JS.pdf
Introduction to Node JS.pdf
 
Webpack slides
Webpack slidesWebpack slides
Webpack slides
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation
 
Svelte JS introduction
Svelte JS introductionSvelte JS introduction
Svelte JS introduction
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
 
An Overview on Nuxt.js
An Overview on Nuxt.jsAn Overview on Nuxt.js
An Overview on Nuxt.js
 
Reactjs
ReactjsReactjs
Reactjs
 
Basics of Vue.js 2019
Basics of Vue.js 2019Basics of Vue.js 2019
Basics of Vue.js 2019
 
ansible why ?
ansible why ?ansible why ?
ansible why ?
 
What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...What are Microservices | Microservices Architecture Training | Microservices ...
What are Microservices | Microservices Architecture Training | Microservices ...
 
Tomcat
TomcatTomcat
Tomcat
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
 
Ansible roles done right
Ansible roles done rightAnsible roles done right
Ansible roles done right
 

Similaire à 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
 
Web assembly: a brief overview
Web assembly: a brief overviewWeb assembly: a brief overview
Web assembly: a brief overviewPavlo Iatsiuk
 
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
 

Similaire à 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
 
Web assembly: a brief overview
Web assembly: a brief overviewWeb assembly: a brief overview
Web assembly: a brief overview
 
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
 

Dernier

OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Hararemasabamasaba
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 

Dernier (20)

OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 

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