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.

Assembly thy web

159 views

Published on

In this short talk, we will discuss how it can extend the capabilities of the web as a software plaftorm by examining its existing and planned features.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Assembly thy web

  1. 1. Assembly thy Web
  2. 2. Martin Ockajak from Zürich Software Engineer @martin_ockajak
  3. 3. Outline ● Introduction ● Technical details ● Future
  4. 4. Introduction
  5. 5. What is WebAssembly ● Virtual instruction set architecture ● Bytecode for the web browser ● Backed by major browser vendors ● Formats ● Text (Assembly Language) ● Binary (Virtual Machine Code) ● Evolved from its predecessors ● Java Applets, ActiveX, PNaCl, asm.js & Emscripten @ LLVM
  6. 6. How does it work
  7. 7. Source languages ● C / C++ ● LLVM, Emscripten, Binaryen & WABT ● Objective-C ? ● Swift ? ● Rust ?
  8. 8. Benefits ● Close to native performance ● Small application size ● Quick decoding (20x faster) ● Portability ● Security
  9. 9. Use cases ● Image & video processing ● Virtual & augmented reality ● Simulation & visualization ● Development tools ● Games
  10. 10. Technical details
  11. 11. Formats
  12. 12. Instruction set ● Integer and floating point data types ● Basic constructs ● Blocks ● Typed functions ● Calls ● Conditionals ● Loops ● Type checking for direct & indirect calls ● Similar to JVM bytecode or CIL
  13. 13. Memory model ● Sandboxed linear memory ● Can be grown programatically ● Indexed tables ● Typed elements ● Indexed local & global variables ● Mutable or immutable
  14. 14. Dynamic linking ● Modules ● Distributable units of code ● Imports & exports ● Module & object name ● Integration with ES6 modules
  15. 15. Security ● Indexed function calls & variables ● Branch target validation ● Shadow stack ● Invalid address causes an exception ● Same origin policy & CORS
  16. 16. Future
  17. 17. High-level features ● Garbage collection ● Zero-cost exceptions ● Threads & processes ● Tail-call optimization ● Source maps ● Potential source languages ● Haskell, Scala, Python, Java, Go
  18. 18. Additional features ● DOM & Web APIs access ● Streaming compilation ● Just-in-time compilation ● SIMD instructions ● Coroutines
  19. 19. Thank you :-)

×