Aprelius logo
uptime: 00:00:00
WebAssembly

WebAssembly Design Principles and Use Cases

Four core design assumptions

  1. Don't trust the executed code — WASM runs in the browser, an untrusted environment, so it's sandboxed by design. Contrast with Java, where opening a socket (new Socket(...)) is trivial — WASM can't allow that kind of direct access.
  2. Support any language — not automatic, requires the community to target the instruction set. Given a stable instruction set, language support is just a matter of time.
  3. Be cross-platform — must run across Windows, Linux, macOS, Android, iOS, etc., despite each platform having its own native instruction set.
  4. Be fast — both at execution and at startup, despite being a binary format that needs parsing before it runs.

Use cases

Inside the browser:

  • Near-native performance for low-level languages (C/C++/Rust) compiled to WASM
  • Music and video processing
  • CAD and 3D modeling
  • Games
  • Creative tools like Figma, Photoshop

Outside the browser:

  • Cloud computing
  • IoT devices
  • Server-side applications
  • Desktop and mobile applications

Reference