Skip to content
uencoder

WASM Sandbox

The WASM sandbox is the WebAssembly isolated execution model: WASM code cannot directly access data outside its memory or the DOM, interacting only through imported functions.

Purpose

To safely execute untrusted code at near-native speed in the browser; the WASM sandbox restricts it to explicitly imported external capabilities.

Mechanism

WASM linear memory is separate from the JS heap and DOM; WASM code can access only its own memory. External interaction goes through explicitly imported functions (provided by JS). No syscalls, no files, no direct network access.

Use cases

  • Safe execution of untrusted code
  • High-performance sandboxing
  • Browser security

Related tools

References