explaingit

webassembly/design

11,577Audience · developerComplexity · 1/5Setup · easy

TLDR

The official design documents for WebAssembly, explaining why it was built, how its security model works, and the trade-offs behind key decisions, maintained by the W3C WebAssembly Community Group.

Mindmap

mindmap
  root((wasm-design))
    What it is
      Design documents
      W3C standard
      Rationale explained
    Key concepts
      Binary format
      Near native speed
      Sandboxed security
    Use cases
      Learn design goals
      Track proposals
      Understand trade offs
    Audience
      Browser engineers
      Language implementors
      Curious developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Read the design rationale to understand why WebAssembly uses a binary format instead of a text format like JavaScript.

USE CASE 2

Study the security model to learn how WebAssembly code is sandboxed from the browser host environment.

USE CASE 3

Track early-stage WebAssembly proposals through the issue tracker before they become part of the formal spec.

Tech stack

WebAssemblyMarkdown

Getting it running

Difficulty · easy Time to first run · 5min

In plain English

WebAssembly (often abbreviated Wasm) is a binary format for running code in web browsers and other environments at near-native speed. Unlike JavaScript, which browsers interpret and compile at runtime, WebAssembly is designed as a compact, low-level format that multiple programming languages can compile to. This lets code written in languages like C, C++, or Rust run inside a browser without being rewritten in JavaScript. This repository is the design home for WebAssembly, maintained by the WebAssembly Community Group, which is part of the World Wide Web Consortium (W3C). It contains high-level design documents that explain the thinking behind how WebAssembly works, why it was designed the way it was, and what trade-offs were made. It also hosts the issue tracker for early-stage proposals (called phase 0 proposals) and a discussion forum for questions. The design documents cover topics like the high-level goals of the project, what portability means in the context of WebAssembly, the rationale behind various design decisions, the security model (how Wasm code is sandboxed from the host system), and how nondeterminism is handled (cases where the same code might behave slightly differently across platforms). A note in the README points out that some of these documents are out of date, and the group is working to update them over time. For the formal, normative specification of WebAssembly (the precise rules the standard is built on), the design documents here are not the right source. The canonical spec lives separately. For general information about WebAssembly and getting started, the project points to webassembly.org.

Copy-paste prompts

Prompt 1
Explain to me why WebAssembly was designed as a binary format rather than a text format, based on its original design goals.
Prompt 2
How does WebAssembly's security model sandbox code from the host browser, what can Wasm code access and what is it blocked from doing?
Prompt 3
I want to compile my C++ code to WebAssembly so it runs in the browser. Explain the high-level steps and what portability guarantees I can count on.
Prompt 4
What does 'nondeterminism' mean in the context of WebAssembly and why does the design allow for it rather than requiring identical behavior everywhere?
Open on GitHub → Explain another repo

← webassembly on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.