WebAssembly For Web Developers

IO RECAP

 

  • Misunderstanding

  • Practice on squoosh

  • Why Fast than JS

  • How can useful to us

  • Upcoming feature

 MISUNDERSTANDING 

 

WHY

🤔🤔🤔🤔🤔

JAVASCRIPT

V8 JIT

TS, JSX...

asm.js

Microsoft Chess

asm.js

WASM

 

WHAT

 😳😳😳😳😳

HIGH LEVEL GOALS

  • Define a portable, size- and load-time-efficient binary format 

  • Specify and implement incrementally

  • Integrate well with the existing Web platform

  • Make a great platform

WASM

 😨😨😨😨😨

😨😨😨😨😨

WASM

 

Efficient, safe, low-level bytecode for the Web

DEMO

WASM TANKS

Hello World

Node Add

AssemblyScript

WHY FAST THAN JS

😏😏😏😏😏

Different Entry Points

TurboFan vs Liftoff

More predictable performance than JS

USE CASES

USE CASES

LIMIT

  • Debugging

  • Harder code splitting

  • WebApI

  • NO GC

Upcoming Feature

  • Closer to native performance

  • Wasm threads proposal

  • SIMD proposal

  • Reference types proposal

  • web IDL proposal

  • support more modern languages

  • GC

RECOMMEND

  • putting everything in wasm is not a good idea

  • JS and wasm are not opponents, there is synery between them, use them togather

  • No incentive for a web developer to learn C++

  • Doesn't recommend write web component with C++,  do some performance, audits measurements, where are your bottlenecks. and see if wasm can help you.

“If you find a gap in the web platform that has been filled many times in another language,but not on the web, not in JS, wasm might be your tool.”

HOW DO I GET STARTED

🤓🤓🤓🤓🤓

THANKS

WebAssembly For Web Developers

By Wang Danna

WebAssembly For Web Developers

  • 558