Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

WebAssembly Overview

316 views

Published on

Overview of WebAssembly technology with status on 2017.
w3c

Published in: Software
  • Be the first to comment

WebAssembly Overview

  1. 1. ITERA UKRAINE 2017 WEB ASSEMBLY OLEKSANDR SKACHKOV @alSkachkov
  2. 2. ABOUT ME • Itera’s Software Architect • Itera’s FrontEnd Tech Lead • WebKit contributor from 2015 & JS hacker • Twitter: @alSkachkov • Email: oleksandr.skachkov@itera.no
  3. 3. WEB ASSEMBLY GAME CHANGER • What was before • WASM – why it is needed • WASM – what is next
  4. 4. HOW JS EVOLVE • Netscape Navigator 2.0 in 1995: • JS was born • NPAPI – for Java plugins • IE 3.0 - ActiveX • Flash player initial release - 1996 • HTML5 • JiT – in modern JS engines - 2008 • Aggressive optimization algorithms and ASM.js
  5. 5. WHAT IS WRONG WITH JS? • Performance • Access to OS features
  6. 6. THE STRENGTH IS A WEAKNESS • Easy to learn • Executes in browser environment • Dynamic typing = • LOW PERFORMANCE!
  7. 7. HOW BROWSER EXECUTE JS
  8. 8. HOW BROWSER EXECUTE JS
  9. 9. HOW BROWSER EXECUTE JS
  10. 10. HOW TO SOLVE BY TOOLS • Frameworks • Minifiers • Optimizers – Prepack • Rules and Hucks
  11. 11. TRIES TO SOLVE IN BROWSER
  12. 12. • WebAssembly, a bytecode standard for web browsers • Announced in 17 June 2015 • Will be developed by major Browsers • Developed by WebAssembly Working Group WebAssembly - Game Changer
  13. 13. • Build target • Binary format • Support integration with JS • Close IR of the JS Engines • WASM 1.2x speed of the native code What is WebAssembly
  14. 14. WEBASSEMBLY IS BUILD TARGET • Build target – for C/C++/Rust
  15. 15. WEBASSEMBLY IS BUILD TARGET • Build target – for C/C++/Rust • Used intermediate representation – S expression WAT/WAST
  16. 16. WEBASSEMBLY IS BUILD TARGET • Build target – for C/C++/Rust • Used intermediate representation – S expression WAT/WAST • Binary format - WASM
  17. 17. HOW BROWSER EXECUTE WASM JS WASM
  18. 18. INTERACTION WITH JAVASCRIPT We can use JS function in WASM and WASM function in JS
  19. 19. INTERACTION WITH JAVASCRIPT We can use JS function in WASM and WASM function in JS
  20. 20. USAGE SCENARIOS • Write faster version of the specific application • Using existing C libraries in browser • Reuse algorithm from service side • Distribute whole application as WebAsm
  21. 21. SECURITY • Limit set of operation • Controlled operation with memory
  22. 22. CAN WE USE WEBASSEMBLY? Global support 57% Yes we can
  23. 23. CURRENT STATUS AND FUTURE Current • MVP • No finalized spec (Experimental feature) Future: • GC • Threads • Tools
  24. 24. EXAMLES • Video editor https://d2jta7o2zej4pf.cloudfront.net/ • Game: http://webassembly.org/demo/Tanks/ • Garden for Mozilla: https://s3.amazonaws.com/mozilla- games/ZenGarden/EpicZenGarden.html • TypeScript for WA: https://github.com/AssemblyScript/assemblyscript
  25. 25. QUESTIONS?

×