├── CNAME ├── .gitignore ├── favicon.ico ├── images ├── owi.png ├── moon.svg ├── sun.svg ├── wasmer.svg ├── wazero.svg ├── feed.svg ├── chrome.svg ├── bca.svg ├── wasm2c.svg ├── nodejs.svg ├── deno.svg ├── graalvm.svg ├── edge.svg ├── safari.svg ├── firefox.svg └── wizard.svg ├── google66d80fe1bc71482a.html ├── assets ├── spectec.png ├── wasm2_0.png ├── wasm3_0.png └── wasm-cups.png ├── js ├── .prettierignore ├── .prettierrc ├── dark-mode-toggle-stylesheets-loader.min.js ├── wasm-compat-test.html ├── package.json ├── package-lock.json ├── README.md ├── dark-mode-toggle.min.mjs ├── wasm-compat.js └── LICENSE ├── .gitmodules ├── .prettierignore ├── _layouts ├── default.html ├── news.html ├── doc.html ├── getting-started.html └── community.html ├── _includes ├── footer.html └── header.html ├── css ├── external.svg ├── light.css ├── dark.css └── webassembly.svg ├── Gemfile ├── _posts ├── 2025-03-19-new-news-section.md ├── 2025-09-17-wasm-compat.md ├── 2025-03-20-wasm-2.0.md ├── 2025-09-17-wasm-3.0.md └── 2025-03-27-spectec.md ├── .prettierrc ├── .github └── workflows │ ├── purge.yml │ ├── update-submodules.yml │ └── ci.yml ├── news.html ├── _plugins ├── underscore_paths.rb ├── link_converter.rb └── auto_titles.rb ├── package.json ├── feed.xml ├── community ├── resources.md ├── contributing.md └── feedback.md ├── _config.yml ├── scripts └── optimize-svgs.js ├── specs.md ├── index.md ├── README.md ├── Gemfile.lock ├── features.schema.json ├── getting-started ├── developers-guide.md ├── advanced-tools.md └── js-api.md ├── features.md ├── LICENSE └── features.js /CNAME: -------------------------------------------------------------------------------- 1 | webassembly.org -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *# 3 | .#* 4 | /docs 5 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebAssembly/website/HEAD/favicon.ico -------------------------------------------------------------------------------- /images/owi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebAssembly/website/HEAD/images/owi.png -------------------------------------------------------------------------------- /google66d80fe1bc71482a.html: -------------------------------------------------------------------------------- 1 | google-site-verification: google66d80fe1bc71482a.html 2 | -------------------------------------------------------------------------------- /assets/spectec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebAssembly/website/HEAD/assets/spectec.png -------------------------------------------------------------------------------- /assets/wasm2_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebAssembly/website/HEAD/assets/wasm2_0.png -------------------------------------------------------------------------------- /assets/wasm3_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebAssembly/website/HEAD/assets/wasm3_0.png -------------------------------------------------------------------------------- /assets/wasm-cups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WebAssembly/website/HEAD/assets/wasm-cups.png -------------------------------------------------------------------------------- /js/.prettierignore: -------------------------------------------------------------------------------- 1 | dark-mode-toggle-stylesheets-loader.min.js 2 | dark-mode-toggle.min.mjs 3 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "docs"] 2 | path = design 3 | url = https://github.com/WebAssembly/design 4 | branch = main 5 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | _includes/ 2 | design/ 3 | /js/dark-mode-toggle-stylesheets-loader.min.js 4 | /js/dark-mode-toggle.min.mjs -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | {% include header.html %} 2 |
3 |
{{content}}
4 |
5 | {% include footer.html %} 6 | -------------------------------------------------------------------------------- /_layouts/news.html: -------------------------------------------------------------------------------- 1 | {% include header.html %} 2 |
3 |
{{content}}
4 |
5 | {% include footer.html %} 6 | -------------------------------------------------------------------------------- /_includes/footer.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /css/external.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | gem 'jekyll', '~> 3.4' 3 | group :jekyll_plugins do 4 | gem 'jekyll-optional-front-matter', '~> 0.1' 5 | gem 'jemoji', '~> 0.8' 6 | end 7 | gem 'html-pipeline', '~> 2.5' 8 | gem 'nokogiri', '~> 1.11' 9 | gem 'html-proofer', '~> 3.6' 10 | -------------------------------------------------------------------------------- /images/moon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/sun.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_posts/2025-03-19-new-news-section.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Big News!' 3 | author: 'Thomas Steiner' 4 | --- 5 | 6 | # Big News! 7 | 8 | _Published on March 19, 2025 by [Thomas Steiner](https://github.com/tomayac)._ 9 | 10 | We launched something new 🎉! A [News](/news/) section for the WebAssembly 11 | homepage! 12 | 13 | ![Two cups with the WebAssembly logo](/assets/wasm-cups.png) 14 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "always", 3 | "bracketSpacing": true, 4 | "htmlWhitespaceSensitivity": "css", 5 | "insertPragma": false, 6 | "bracketSameLine": false, 7 | "jsxSingleQuote": false, 8 | "printWidth": 80, 9 | "proseWrap": "always", 10 | "quoteProps": "as-needed", 11 | "requirePragma": false, 12 | "semi": true, 13 | "singleQuote": true, 14 | "tabWidth": 2, 15 | "trailingComma": "es5", 16 | "useTabs": false, 17 | "vueIndentScriptAndStyle": false 18 | } 19 | -------------------------------------------------------------------------------- /js/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "always", 3 | "bracketSpacing": true, 4 | "htmlWhitespaceSensitivity": "css", 5 | "insertPragma": false, 6 | "bracketSameLine": false, 7 | "jsxSingleQuote": false, 8 | "printWidth": 80, 9 | "proseWrap": "always", 10 | "quoteProps": "as-needed", 11 | "requirePragma": false, 12 | "semi": true, 13 | "singleQuote": true, 14 | "tabWidth": 2, 15 | "trailingComma": "es5", 16 | "useTabs": false, 17 | "vueIndentScriptAndStyle": false 18 | } 19 | -------------------------------------------------------------------------------- /images/wasmer.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/workflows/purge.yml: -------------------------------------------------------------------------------- 1 | name: Purge CDN cache 2 | 3 | on: page_build 4 | 5 | jobs: 6 | purge: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - name: Purge Cloudflare cache 11 | run: | 12 | curl "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE }}/purge_cache" \ 13 | -H "Authorization: Bearer ${{ secrets.CLOUDFLARE_PURGE_CACHE_TOKEN }}" \ 14 | -H "Content-Type: application/json" \ 15 | --data '{"purge_everything": true}' \ 16 | --fail 17 | -------------------------------------------------------------------------------- /css/light.css: -------------------------------------------------------------------------------- 1 | :root { 2 | color-scheme: light; 3 | } 4 | 5 | .flash.flash-warn { 6 | color: #000; 7 | background-color: #feffd1; 8 | } 9 | 10 | .flash.flash-warn a { 11 | color: #9c8529; 12 | } 13 | 14 | .lead { 15 | color: #555; 16 | } 17 | 18 | blockquote { 19 | color: #777; 20 | } 21 | 22 | h6 { 23 | color: #777; 24 | } 25 | 26 | table th, 27 | table td { 28 | border: 1px solid #ddd; 29 | } 30 | 31 | table tr { 32 | border-top: 1px solid #ccc; 33 | } 34 | 35 | table tr:nth-child(2n) { 36 | background-color: #f8f8f8; 37 | } 38 | -------------------------------------------------------------------------------- /news.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: news 3 | title: News 4 | permalink: /news/index.html 5 | --- 6 | 7 |

News

8 | Subscribe to the news feed 16 | 24 | -------------------------------------------------------------------------------- /images/wazero.svg: -------------------------------------------------------------------------------- 1 | wazero -------------------------------------------------------------------------------- /_layouts/doc.html: -------------------------------------------------------------------------------- 1 | {% include header.html %} 2 |
3 |
4 |
5 |
{{content}}
6 |
7 |
Documentation
8 | 14 |
15 |
16 |
17 |
18 | {% include footer.html %} 19 | -------------------------------------------------------------------------------- /js/dark-mode-toggle-stylesheets-loader.min.js: -------------------------------------------------------------------------------- 1 | // @license © 2024 Google LLC. Licensed under the Apache License, Version 2.0. 2 | // @license © 2024 Google LLC. Licensed under the Apache License, Version 2.0. 3 | (()=>{const s="dark-mode-toggle-stylesheets";const t="dark-mode-toggle";const e="light";const l="dark";let o=document.getElementById(s).textContent;let a=null;try{a=localStorage.getItem(t)}catch(s){return}const c=/\(\s*prefers-color-scheme\s*:\s*light\s*\)/gi;const r=/\(\s*prefers-color-scheme\s*:\s*dark\s*\)/gi;const n=/\b(?:dark\s+light|light\s+dark)\b/;switch(a){case e:o=o.replace(c,"$&, all").replace(r,"$& and not all").replace(n,a);break;case l:o=o.replace(r,"$&, all").replace(c,"$& and not all").replace(n,a);break}document.write(o)})(); -------------------------------------------------------------------------------- /_plugins/underscore_paths.rb: -------------------------------------------------------------------------------- 1 | module Jekyll 2 | class Page 3 | def url=(name) 4 | @url = name 5 | end 6 | end 7 | end 8 | 9 | module UnderscorePaths 10 | # turn "PostMVP" camel case convention (from design repo) 11 | # into "post-mvp", consistent with desired URL format 12 | class Generator < Jekyll::Generator 13 | def generate(site) 14 | site.pages.each { |p| underscore_links(p) } 15 | end 16 | def underscore_links(page) 17 | page.url = underscore(page.url).gsub(/^\/design\//, '/docs/') 18 | end 19 | 20 | def underscore(str) 21 | str.gsub(/::/, '/'). 22 | gsub(/([A-Z]+)([A-Z][a-z])/,'\1-\2'). 23 | gsub(/([a-z\d])([A-Z])/,'\1-\2'). 24 | downcase 25 | end 26 | 27 | end 28 | end 29 | 30 | -------------------------------------------------------------------------------- /css/dark.css: -------------------------------------------------------------------------------- 1 | :root { 2 | color-scheme: dark; 3 | } 4 | 5 | :not(.flash) > a[href^='http']::after { 6 | filter: invert(1); 7 | } 8 | 9 | .flash.flash-warn { 10 | color: CanvasText; 11 | background-color: #555; 12 | } 13 | 14 | .flash.flash-warn a { 15 | color: #f2db81; 16 | } 17 | 18 | ::after { 19 | filter: invert(1) brightness(0.8); 20 | } 21 | 22 | .lead { 23 | color: #999; 24 | } 25 | 26 | blockquote { 27 | color: #999; 28 | } 29 | 30 | h6 { 31 | color: #999; 32 | } 33 | 34 | table th, 35 | table td { 36 | border: 1px solid #222; 37 | } 38 | 39 | table tr { 40 | border-top: 1px solid #333; 41 | } 42 | 43 | table tr:nth-child(2n) { 44 | background-color: #303030; 45 | } 46 | 47 | .feature-cell { 48 | filter: brightness(2); 49 | } 50 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webassembly_org", 3 | "version": "1.0.0", 4 | "description": "The webassembly.org website", 5 | "main": "features.js", 6 | "directories": { 7 | "doc": "docs" 8 | }, 9 | "scripts": { 10 | "start": "bundle exec jekyll serve", 11 | "prettier": "npx prettier . --write", 12 | "optimize-svgs": "node scripts/optimize-svgs.js", 13 | "copy-js": "shx cp ./node_modules/dark-mode-toggle/dist/* ./js/" 14 | }, 15 | "keywords": [ 16 | "webassembly", 17 | "wasm" 18 | ], 19 | "author": "The WebAssembly community", 20 | "license": "Apache-2.0", 21 | "devDependencies": { 22 | "prettier": "^3.7.4", 23 | "svgo": "^4.0.0", 24 | "shx": "^0.4.0" 25 | }, 26 | "type": "module", 27 | "dependencies": { 28 | "dark-mode-toggle": "^0.18.0" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /images/feed.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /js/wasm-compat-test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 17 | 18 | 19 | 20 |

<wasm-feature>

21 |

Regular

22 | 23 |

No header

24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /js/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wasm-compat", 3 | "version": "1.3.0", 4 | "description": "A custom element for showing engine compatibility information of Wasm features", 5 | "keywords": [ 6 | "wasm-compat" 7 | ], 8 | "homepage": "https://github.com/WebAssembly/website#readme", 9 | "bugs": { 10 | "url": "https://github.com/WebAssembly/website/issues" 11 | }, 12 | "files": [ 13 | "wasm-compat.js" 14 | ], 15 | "repository": { 16 | "type": "git", 17 | "url": "git+https://github.com/WebAssembly/website.git" 18 | }, 19 | "devDependencies": { 20 | "prettier": "^3.6.2" 21 | }, 22 | "license": "Apache-2.0", 23 | "author": "Thomas Steiner (tomac@google.com)", 24 | "type": "module", 25 | "main": "wasm-compat.js", 26 | "exports": { 27 | ".": "./wasm-compat.js" 28 | }, 29 | "scripts": { 30 | "prettier": "npx prettier . --write --embedded-language-formatting=auto" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /feed.xml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: none 3 | permalink: /feed.xml 4 | --- 5 | 6 | 7 | WebAssembly News 8 | 9 | 10 | {{ site.posts[0].date | date_to_xmlschema }} 11 | https://webassembly.org/ 12 | {% for post in site.posts %} 13 | 14 | {{ post.title }} 15 | 16 | {{ post.author }} 17 | 18 | 19 | https://webassembly.org{{ post.url }} 20 | {{ post.date | date_to_xmlschema }} 21 | {{ post.excerpt | strip_html | strip_newlines }} 22 | 23 | 24 | {% endfor %} 25 | -------------------------------------------------------------------------------- /js/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wasm-compat", 3 | "version": "1.3.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "wasm-compat", 9 | "version": "1.3.0", 10 | "license": "Apache-2.0", 11 | "devDependencies": { 12 | "prettier": "^3.6.2" 13 | } 14 | }, 15 | "node_modules/prettier": { 16 | "version": "3.6.2", 17 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", 18 | "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", 19 | "dev": true, 20 | "license": "MIT", 21 | "bin": { 22 | "prettier": "bin/prettier.cjs" 23 | }, 24 | "engines": { 25 | "node": ">=14" 26 | }, 27 | "funding": { 28 | "url": "https://github.com/prettier/prettier?sponsor=1" 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /_layouts/getting-started.html: -------------------------------------------------------------------------------- 1 | {% include header.html %} 2 |
3 |
4 |
5 |
{{content}}
6 |
7 |
Getting Started
8 | 22 |
23 |
24 |
25 |
26 | {% include footer.html %} 27 | -------------------------------------------------------------------------------- /_plugins/link_converter.rb: -------------------------------------------------------------------------------- 1 | module LocalMdLinksToHtml 2 | class Generator < Jekyll::Generator 3 | def generate(site) 4 | site.pages.each { |p| rewrite_links(p) } 5 | end 6 | def rewrite_links(page) 7 | page.content = page.content.gsub(/\[([^\]]*)\]\(([^:\)]*)\.md(#[^\)\s]*)?(?: "[^"\)]*")?\)/) do 8 | slug = underscore($2) 9 | "[#{$1}](../#{slug}/#{$3})" 10 | end 11 | page.content = page.content.gsub(/\[([^\]]*)\]: ([^:\)]*)\.md(#[^\)\s]*)?/) do 12 | slug = underscore($2) 13 | "[#{$1}]: ../#{slug}/#{$3}" 14 | end 15 | page.content = page.content.gsub(/\[([^\]]*)\]: <([^:\)]*)\.md(#[^\)\s]*)?>/) do 16 | slug = underscore($2) 17 | "[#{$1}]: <../#{slug}/#{$3}>" 18 | end 19 | end 20 | 21 | def underscore(str) 22 | str.gsub(/::/, '/'). 23 | gsub(/([A-Z]+)([A-Z][a-z])/,'\1-\2'). 24 | gsub(/([a-z\d])([A-Z])/,'\1-\2'). 25 | downcase 26 | end 27 | end 28 | end -------------------------------------------------------------------------------- /images/chrome.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /_layouts/community.html: -------------------------------------------------------------------------------- 1 | {% include header.html %} 2 |
3 |
4 |
5 |
{{content}}
6 |
7 |
Community
8 | 23 |
24 |
25 |
26 |
27 | {% include footer.html %} 28 | -------------------------------------------------------------------------------- /images/bca.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/workflows/update-submodules.yml: -------------------------------------------------------------------------------- 1 | name: Update Submodules 2 | 3 | on: 4 | push: 5 | branches: 6 | - main # Change this if your default branch is different 7 | schedule: 8 | - cron: '0 0 * * *' # Runs daily at midnight UTC 9 | workflow_dispatch: # Allows manual triggering from GitHub Actions UI 10 | 11 | jobs: 12 | update-submodules: 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - name: Checkout repository (including submodules) 17 | uses: actions/checkout@v4 18 | with: 19 | submodules: true 20 | fetch-depth: 0 # Ensure full history for submodules 21 | 22 | - name: Update submodules 23 | run: | 24 | git submodule update --remote 25 | if [ -n "$(git status --porcelain)" ]; then 26 | echo "Submodules updated, committing changes." 27 | git config --global user.name "github-actions[bot]" 28 | git config --global user.email "github-actions[bot]@users.noreply.github.com" 29 | git commit -am "Update submodules to latest commit" 30 | git push 31 | else 32 | echo "No submodule updates found." 33 | fi 34 | -------------------------------------------------------------------------------- /community/resources.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: community 3 | --- 4 | 5 | # Resources 6 | 7 | There's a lot of community-driven public discussion forums, chats and channels 8 | where you can get help with any WebAssembly-related questions, answer them for 9 | others, or subscribe to WebAssembly news. 10 | 11 | Here are just some of the popular ways to get started: 12 | 13 | - [Discord chat](https://discord.gg/jwCC7jS) 14 | - [Collection of awesome things in the Wasm ecosystem](https://github.com/mbasso/awesome-wasm) 15 | - [Reddit: r/WebAssembly](https://www.reddit.com/r/WebAssembly/) 16 | - [Stackoverflow: `#webassembly` tag](https://stackoverflow.com/questions/tagged/webassembly) 17 | - [WasmAssembly podcast](https://wasmassembly.libsyn.com/) or 18 | [WasmAssembly videocast](https://www.youtube.com/playlist?list=PLNYkxOF6rcIA46I-YCX3ASF4SRb548z8s) 19 | 20 | ## Playgrounds 21 | 22 | - wasm-tools web playground: 23 | - [WAT to Wasm](https://bytecodealliance.github.io/wasm-tools/parse) 24 | - [Wasm to WAT](https://bytecodealliance.github.io/wasm-tools/print) 25 | 26 | ## Contributing 27 | 28 | Interesting in contributing to WebAssembly? Check out the 29 | [Contributing](/community/contributing/) page. 30 | -------------------------------------------------------------------------------- /_plugins/auto_titles.rb: -------------------------------------------------------------------------------- 1 | require 'nokogiri' 2 | 3 | module AutoTitles 4 | class Generator < Jekyll::Generator 5 | def generate(site) 6 | site.pages.each { |p| generate_title(p) } 7 | end 8 | 9 | def generate_title(page) 10 | page.data["title"] = guess_title(page) 11 | page.data["weight"] = assign_weight(page.data["title"]) 12 | end 13 | 14 | # TODO:s3ththompson avoid hard-coding titles 15 | def assign_weight(title) 16 | order = [ 17 | "FAQ", 18 | "WebAssembly High-Level Goals", 19 | "Use Cases", 20 | "Portability", 21 | "Security", 22 | "Web Embedding", 23 | "Non-Web Embeddings", 24 | "Tooling support", 25 | ] 26 | if order.include?(title) 27 | order.index(title) 28 | else 29 | 999 30 | end 31 | 32 | end 33 | 34 | def guess_title(page) 35 | # return first heading 36 | html = Kramdown::Document.new(page.content).to_html 37 | doc = Nokogiri::HTML(html) 38 | ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].each do |query| 39 | unless (h = doc.at_css(query)).nil? 40 | return h.inner_text 41 | end 42 | end 43 | "" 44 | end 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /images/wasm2c.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /community/contributing.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: community 3 | --- 4 | 5 | # Contributing to WebAssembly 6 | 7 | WebAssembly is initially designed and implemented by browser vendors who are 8 | interested in meeting a variety of [use cases](/docs/use-cases/). As design and 9 | implementation progresses they'll need input and contributions from developers 10 | interested in using WebAssembly. 11 | 12 | Interested in participating? We suggest you start by: 13 | 14 | 1. Acquainting yourself with the 15 | [Code of Ethics and Professional Conduct](/community/code-of-conduct/). 16 | 2. Reading the [WebAssembly design][]. 17 | 3. Joining the [Discord #cg chat](https://discord.gg/kx5VNQa). 18 | 19 | With that background understood and communication set up, feel free to [file 20 | issues][] in the WebAssembly design repository. Please join the [W3C Community 21 | Group][] before sending pull requests: it provides the legal framework that 22 | protects the work in this repository. Make sure you're affiliated with your 23 | company or organization in the Community Group, if any. 24 | 25 | As WebAssembly moves forward we expect to form an official standards body, which 26 | will have its own contribution process to the specification. 27 | 28 | Happy assembly! 29 | 30 | [WebAssembly design]: https://github.com/WebAssembly/design 31 | [file issues]: https://github.com/WebAssembly/design/issues 32 | [W3C Community Group]: https://www.w3.org/community/webassembly/ 33 | -------------------------------------------------------------------------------- /community/feedback.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: community 3 | --- 4 | 5 | # Submitting Feedback & Issues 6 | 7 | We welcome community and developer feedback on all aspects of WebAssembly, 8 | including the high-level design, binary format, JS API, developer experience, 9 | and browser implementations. 10 | 11 | Please contribute your feedback or issues in the following forums: 12 | 13 | - High level design feedback: [WebAssembly/design][] 14 | - Specification bugs / suggestions: [WebAssembly/spec][] 15 | - Test suite / reference interpreter issues: [WebAssembly/spec][] 16 | - Emscripten / Binaryen / LLVM issues: [WebAssembly/binaryen][] 17 | - WABT issues: [WebAssembly/wabt][] 18 | - V8 / Chrome bugs: [crbug.com/v8][] 19 | - SpiderMonkey / Firefox bugs: [bugzilla.mozilla.org][] 20 | - Chakra / Edge bugs: [Microsoft/ChakraCore][] 21 | - Website bugs: [WebAssembly/website][] 22 | 23 | [WebAssembly/design]: https://github.com/WebAssembly/design 24 | [WebAssembly/spec]: https://github.com/WebAssembly/spec 25 | [WebAssembly/binaryen]: https://github.com/WebAssembly/binaryen 26 | [WebAssembly/wabt]: https://github.com/WebAssembly/wabt 27 | [crbug.com/v8]: 28 | https://bugs.chromium.org/p/v8/issues/entry?template=WASM%20issue 29 | [bugzilla.mozilla.org]: 30 | https://bugzilla.mozilla.org/enter_bug.cgi?component=JavaScript%20Engine&product=Core 31 | [Microsoft/ChakraCore]: https://github.com/Microsoft/ChakraCore/issues/new 32 | [WebAssembly/website]: https://github.com/WebAssembly/website 33 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | name: WebAssembly 2 | 3 | include: [.github] 4 | 5 | exclude: 6 | [ 7 | README.md, 8 | LICENSE, 9 | Gemfile, 10 | Gemfile.lock, 11 | design/LICENSE, 12 | design/Contributing.md, 13 | design/README.md, 14 | design/tools, 15 | design/JS.md, 16 | design/BinaryEncoding.md, 17 | design/TextFormat.md, 18 | design/Semantics.md, 19 | design/Nondeterminism.md, 20 | design/Rationale.md, 21 | design/MVP.md, 22 | design/Modules.md, 23 | design/FutureFeatures.md, 24 | design/FeatureTest.md, 25 | design/JITLibrary.md, 26 | design/DynamicLinking.md, 27 | design/CAndC++.md, 28 | docs, 29 | vendor, 30 | ] 31 | 32 | destination: docs 33 | 34 | permalink: pretty 35 | 36 | defaults: 37 | - scope: 38 | path: '_posts' 39 | type: 'posts' 40 | values: 41 | layout: news 42 | category: news 43 | permalink: /news/:year-:month-:day-:title/ 44 | - scope: 45 | path: 'news' 46 | type: 'news' 47 | values: 48 | layout: 'news' 49 | - scope: 50 | path: 'design' 51 | values: 52 | layout: 'doc' 53 | type: 'doc' 54 | - scope: 55 | path: 'design/CodeOfConduct.md' 56 | values: 57 | layout: 'community' 58 | type: 'community' 59 | permalink: '/community/code-of-conduct/' 60 | - scope: 61 | path: 'design/Events.md' 62 | values: 63 | layout: 'community' 64 | type: 'community' 65 | permalink: '/community/events/' 66 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [main] 6 | pull_request: 7 | branches: [main] 8 | 9 | jobs: 10 | test: 11 | name: Test 12 | runs-on: ubuntu-latest 13 | permissions: {} 14 | 15 | steps: 16 | - name: Checkout 17 | uses: actions/checkout@v3 18 | with: 19 | submodules: false # Currently not necessary 20 | 21 | - name: Set up Node 22 | uses: actions/setup-node@v3 23 | with: 24 | node-version: 18 25 | 26 | - name: Install JSON validator 27 | run: npm install -g ajv-cli@5 ajv-formats@2 28 | 29 | - name: Validate features table 30 | run: 31 | ajv -c ajv-formats -s features.schema.json -d features.json 32 | --strict=true --errors=text 33 | 34 | build: 35 | name: Build & Deploy 36 | runs-on: ubuntu-latest 37 | permissions: 38 | contents: write 39 | 40 | steps: 41 | - name: Checkout 42 | uses: actions/checkout@v3 43 | with: 44 | submodules: recursive 45 | 46 | - name: Set up Ruby 47 | uses: ruby/setup-ruby@v1 48 | with: 49 | ruby-version: 2.7 50 | bundler-cache: true 51 | 52 | - name: Build 53 | run: bundle exec jekyll build 54 | 55 | - name: Deploy 56 | if: github.event_name == 'push' 57 | uses: peaceiris/actions-gh-pages@v3 58 | with: 59 | github_token: ${{ secrets.GITHUB_TOKEN }} 60 | publish_dir: docs 61 | user_name: 'github-actions[bot]' 62 | user_email: 'github-actions[bot]@users.noreply.github.com' 63 | exclude_assets: '' 64 | -------------------------------------------------------------------------------- /scripts/optimize-svgs.js: -------------------------------------------------------------------------------- 1 | import fs from 'fs'; 2 | import path from 'path'; 3 | import { optimize } from 'svgo'; 4 | 5 | // Function to recursively find all SVG files in a directory 6 | function findSvgFiles(dir, fileList = []) { 7 | const files = fs.readdirSync(dir); 8 | 9 | files.forEach((file) => { 10 | const filePath = path.join(dir, file); 11 | const stats = fs.statSync(filePath); 12 | 13 | if (stats.isDirectory()) { 14 | findSvgFiles(filePath, fileList); // Recursively call for subdirectories 15 | } else if (stats.isFile() && path.extname(file).toLowerCase() === '.svg') { 16 | fileList.push(filePath); // Add SVG file to the list 17 | } 18 | }); 19 | 20 | return fileList; 21 | } 22 | 23 | // Function to optimize an SVG file 24 | function optimizeSvg(filePath) { 25 | const svgString = fs.readFileSync(filePath, 'utf8'); 26 | 27 | const result = optimize(svgString, { 28 | path: filePath, // Recommended for better error reporting 29 | multipass: true, // Enable multipass optimization 30 | // Add any other SVGO plugin configuration here if needed 31 | }); 32 | 33 | // Write the optimized SVG back to the file 34 | fs.writeFileSync(filePath, result.data, 'utf8'); 35 | console.log(`Optimized: ${filePath}`); 36 | } 37 | 38 | // Main function to process a given directory 39 | function processDirectory(baseDir) { 40 | const svgFiles = findSvgFiles(baseDir); 41 | 42 | if (svgFiles.length === 0) { 43 | console.log('No SVG files found.'); 44 | return; 45 | } 46 | 47 | console.log(`Found ${svgFiles.length} SVG file(s). Optimizing…`); 48 | svgFiles.forEach((filePath) => { 49 | try { 50 | optimizeSvg(filePath); 51 | } catch (error) { 52 | console.error(`Error optimizing ${filePath}:`, error.message); 53 | } 54 | }); 55 | } 56 | 57 | const directoryToOptimize = '.'; 58 | processDirectory(directoryToOptimize); 59 | -------------------------------------------------------------------------------- /specs.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | # Specifications 6 | 7 | - [WebAssembly Specification](https://webassembly.github.io/spec/core/) 8 | (Wasm 3.0): defines the semantics of WebAssembly modules independent from 9 | a concrete embedding. The WebAssembly core is specified in a single document.\ 10 | Older versions: 11 | - [WebAssembly Core Specification — W3C Candidate Recommendation Draft, 16 June 2025](https://www.w3.org/TR/2025/CRD-wasm-core-2-20250616/) 12 | (Wasm 2.0) 13 | - [WebAssembly Core Specification — W3C Recommendation, 5 December 2019](https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/) 14 | (Wasm 1.0) 15 | - Embedding interfaces: 16 | - [JavaScript API](https://webassembly.github.io/spec/js-api/index.html): 17 | defines JavaScript classes and objects for accessing WebAssembly from within 18 | JavaScript, including methods for validation, compilation, instantiation, 19 | and classes for representing and manipulating imports and exports as 20 | JavaScript objects. 21 | - [Web API](https://webassembly.github.io/spec/web-api/index.html): defines 22 | extensions to the JavaScript API made available specifically in web 23 | browsers, in particular, an interface for streaming compilation and 24 | instantiation from origin-bound `Response` types. 25 | - [WASI API](https://github.com/WebAssembly/WASI/blob/main/docs/Proposals.md): 26 | defines a modular system interface to run WebAssembly outside the web, 27 | providing access to things like files, network connections, clocks, and 28 | random numbers. 29 | - [Tool conventions](https://github.com/WebAssembly/tool-conventions): 30 | repository describing non-standard conventions useful for coordinating 31 | interoperability between tools working with WebAssembly. This includes 32 | conventions for linking schemes, debugging information, language ABIs and 33 | more. 34 | - [Original design documents](https://github.com/WebAssembly/design): documents 35 | describing the design, goals and high-level overview of WebAssembly. Some of 36 | these documents are outdated by now. 37 | -------------------------------------------------------------------------------- /images/nodejs.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /js/README.md: -------------------------------------------------------------------------------- 1 | # A <wasm-compat> custom element 2 | 3 | The [Feature Status](https://webassembly.org/features/) table on the WebAssembly 4 | website shows the various engines' support statuses in one handy global 5 | overview, including the support status in your own browser. That's fantastic and 6 | what most people will usually resort to when they need compatibility information 7 | about Wasm features. 8 | 9 | For the occasional case where you want to show a feature's support status for 10 | the various Wasm engines in isolation, for example, in the context of an 11 | article, this is the custom element `` that you can use. 12 | 13 | ## Installation 14 | 15 | You can install the custom element from npm, use a CDN like 16 | [unpkg.com](https://unpkg.com/wasm-compat), or simply host the 17 | [code](https://raw.githubusercontent.com/WebAssembly/website/refs/heads/main/js/wasm-compat.js) 18 | yourself. 19 | 20 | ```bash 21 | npm install wasm-compat 22 | ``` 23 | 24 | ## Usage 25 | 26 | The following code snippet shows you how to use it to display the support status 27 | for the _JS BigInt to Wasm i64 Integration_ feature. 28 | 29 | ```html 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | ``` 44 | 45 | The value of the `wasm-feature` attribute is any of the `$.features` (in 46 | [JSONPath](https://www.rfc-editor.org/rfc/rfc9535.html) notation) keys of the 47 | community-maintained 48 | [`features.json`](https://github.com/WebAssembly/website/blob/main/features.json#L3) 49 | file. For instance, in the case of the _JS BigInt to Wasm i64 Integration_ 50 | feature, the key is `bigInt`. 51 | 52 | ## Demo 53 | 54 | Experience the custom element in action on this 55 | [example page](https://webassembly.org/js/wasm-compat-test.html). To see all 56 | currently existing features, see the bottom part of this 57 | [announcement article](https://webassembly.org/news/2025-09-17-wasm-compat/). 58 | 59 | ## License 60 | 61 | Apache 2.0. 62 | -------------------------------------------------------------------------------- /images/deno.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/graalvm.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | lead: 4 | WebAssembly (abbreviated Wasm) is a binary instruction format for a 5 | stack-based virtual machine. Wasm is designed as a portable compilation target 6 | for programming languages, enabling deployment on the web for client and 7 | server applications. 8 | --- 9 | 10 |
11 | Developer reference documentation for Wasm can be found on MDN's WebAssembly pages. 12 | The open standards for WebAssembly are developed in a W3C Community Group (that includes representatives from all major browsers) as well as a W3C Working Group. 13 |
14 |
15 |
16 |

Efficient and fast

17 |

The Wasm stack machine is designed to be encoded in a size- and load-time-efficient binary format. WebAssembly aims to execute at native speed by taking advantage of common hardware capabilities available on a wide range of platforms.

18 |
19 |
20 |

Safe

21 |

WebAssembly describes a memory-safe, sandboxed execution environment that may even be implemented inside existing JavaScript virtual machines. When embedded in the web, WebAssembly will enforce the same-origin and permissions security policies of the browser.

22 |
23 |
24 |
25 |
26 |

Open and debuggable

27 |

WebAssembly is designed to be pretty-printed in a textual format for debugging, testing, experimenting, optimizing, learning, teaching, and writing programs by hand. The textual format will be used when viewing the source of Wasm modules on the web.

28 |
29 |
30 |

Part of the open web platform

31 |

WebAssembly is designed to maintain the versionless, feature-tested, and backwards-compatible nature of the web. WebAssembly modules will be able to call into and out of the JavaScript context and access browser functionality through the same Web APIs accessible from JavaScript. WebAssembly also supports non-web embeddings.

32 |
33 |
34 | -------------------------------------------------------------------------------- /_posts/2025-09-17-wasm-compat.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'A <wasm-compat> custom element' 3 | author: 'Thomas Steiner' 4 | --- 5 | 6 | # A <wasm-compat> custom element 7 | 8 | _Published on September 17, 2025 by 9 | [Thomas Steiner](https://github.com/tomayac)._ 10 | 11 | The [Feature Status](https://webassembly.org/features/) table on the WebAssembly 12 | website shows the various engines' support statuses in one handy global 13 | overview, including the support status in your own browser. That's fantastic and 14 | what most people will usually resort to when they need compatibility information 15 | about Wasm features. 16 | 17 | For the occasional case where you want to show a feature's support status for 18 | the various Wasm engines in isolation, for example, in the context of an 19 | article, this is the custom element `` that you can use. 20 | 21 | ## Installation 22 | 23 | You can install the custom element from npm, use a CDN like 24 | [unpkg.com](https://unpkg.com/wasm-compat), or simply host the 25 | [code](https://raw.githubusercontent.com/WebAssembly/website/refs/heads/main/js/wasm-compat.js) 26 | yourself. 27 | 28 | ```bash 29 | npm install wasm-compat 30 | ``` 31 | 32 | ## Usage 33 | 34 | The following code snippet shows you how to use it to display the support status 35 | for the _JS BigInt to Wasm i64 Integration_ feature. 36 | 37 | ```html 38 | 39 | 40 | 41 | 47 | 48 | 49 | ``` 50 | 51 | The value of the `wasm-feature` attribute is any of the `$.features` (in 52 | [JSONPath](https://www.rfc-editor.org/rfc/rfc9535.html) notation) keys of the 53 | community-maintained 54 | [`features.json`](https://github.com/WebAssembly/website/blob/main/features.json#L3) 55 | file. For instance, in the case of the _JS BigInt to Wasm i64 Integration_ 56 | feature, the key is `bigInt`. 57 | 58 | For the fun of it, the following section contains the support statuses for all 59 | currently documented features. If you prefer, there's a simple 60 | [test page](/js/wasm-compat-test.html) available with just one example. 61 | 62 |
63 | 64 | 71 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Website 2 | 3 | Project overview for WebAssembly: [webassembly.org](https://webassembly.org) 4 | 5 | ## Dependencies 6 | 7 | - Ruby >= 2.3.0 8 | - [Bundler](https://bundler.io/) 9 | 10 | ## Building the site 11 | 12 | Clone the project and the `design` submodule: 13 | 14 | ``` 15 | $ git clone https://github.com/WebAssembly/website 16 | $ git submodule update --init --recursive 17 | ``` 18 | 19 | Install gem dependencies: 20 | 21 | ``` 22 | $ bundle install 23 | ``` 24 | 25 | Build with Jekyll or serve local preview: 26 | 27 | ``` 28 | $ bundle exec jekyll build 29 | $ bundle exec jekyll serve 30 | ``` 31 | 32 | > You must run `bundle exec jekyll build` after every change and include the 33 | > `docs` directory in your commit! 34 | 35 | ## Publishing 36 | 37 | This site uses Jekyll plugins, so GitHub Pages will not build it automatically. 38 | To publish, check in manually built static site files to the `docs` directory. 39 | 40 | The static site should be configured to build to the `docs` directory. The 41 | `docs` directory is a special directory from which GitHub pages can publish 42 | directly. The naming convention is unfortunate given the confusing overlap with 43 | the site's own `docs` pages (output to `docs/docs`) which are themselves 44 | generated from the design docs submodule located at `design`. 45 | 46 | ## What is the role of `_config.yml` and the custom Jekyll plugins? 47 | 48 | > Note: the following plugins are all hacks to make the workflow of generating 49 | > website docs from the `design` repo work without updating the sources in the 50 | > design repo. 51 | 52 | - `gem 'jekyll-optional-front-matter'` loaded directly in the `Gemfile` allows 53 | markdown files without YAML frontmatter to be consumed directly. This is 54 | included to allow `design` repo `.md` files to be used as pages without 55 | modifying their source to add frontmatter. 56 | - `gem 'jemoji'` loaded directly in the `Gemfile` replaces GitHub-style emoji 57 | markdown (e.g. `:+1:`) with images for compat. 58 | - The `defaults` section of `_config.yml` adds default values to the YAML 59 | frontmatter of documents from the `design` repo. In particular, it specifies 60 | that all `.md` files in the design submodule should be labelled as type `doc` 61 | and given layout `doc.html`. It also manually moves a few docs into the 62 | `community` tree where they fit the site organization better. 63 | - `auto_titles.rb` adds a `title` value to YAML frontmatter by looking for the 64 | first header tag in the source files. It also orders the design docs based on 65 | a hardcoded list. 66 | - `link_converter.rb` turns the `design` repo's links (e.g. 67 | `[threads](FutureFeatures.md#threads)`) into their respective locations on 68 | this website (e.g. `[threads](/docs/future-features/#threads)`). 69 | - `underscore_paths.rb` rewrites Jekyll page permalinks to convert 70 | `/design/FutureFeatures/` to `/docs/future-features/`. 71 | -------------------------------------------------------------------------------- /_includes/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 12 | 13 | 14 | {% if page.url == "/" %}WebAssembly{% else %}{{ page.title }} - WebAssembly{% endif %} 15 | 16 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 |
31 | 32 | 47 |
48 |
49 | {% if page.lead %} 50 |
51 |
52 |

{{page.lead}}

53 |
54 |
55 | {% endif %} 56 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | activesupport (6.0.3.1) 5 | concurrent-ruby (~> 1.0, >= 1.0.2) 6 | i18n (>= 0.7, < 2) 7 | minitest (~> 5.1) 8 | tzinfo (~> 1.1) 9 | zeitwerk (~> 2.2, >= 2.2.2) 10 | addressable (2.7.0) 11 | public_suffix (>= 2.0.2, < 5.0) 12 | colorator (1.1.0) 13 | concurrent-ruby (1.1.6) 14 | em-websocket (0.5.1) 15 | eventmachine (>= 0.12.9) 16 | http_parser.rb (~> 0.6.0) 17 | ethon (0.12.0) 18 | ffi (>= 1.3.0) 19 | eventmachine (1.2.7) 20 | ffi (1.13.1) 21 | forwardable-extended (2.6.0) 22 | gemoji (3.0.1) 23 | html-pipeline (2.13.0) 24 | activesupport (>= 2) 25 | nokogiri (>= 1.4) 26 | html-proofer (3.15.3) 27 | addressable (~> 2.3) 28 | mercenary (~> 0.3) 29 | nokogumbo (~> 2.0) 30 | parallel (~> 1.3) 31 | rainbow (~> 3.0) 32 | typhoeus (~> 1.3) 33 | yell (~> 2.0) 34 | http_parser.rb (0.6.0) 35 | i18n (0.9.5) 36 | concurrent-ruby (~> 1.0) 37 | jekyll (3.8.7) 38 | addressable (~> 2.4) 39 | colorator (~> 1.0) 40 | em-websocket (~> 0.5) 41 | i18n (~> 0.7) 42 | jekyll-sass-converter (~> 1.0) 43 | jekyll-watch (~> 2.0) 44 | kramdown (~> 1.14) 45 | liquid (~> 4.0) 46 | mercenary (~> 0.3.3) 47 | pathutil (~> 0.9) 48 | rouge (>= 1.7, < 4) 49 | safe_yaml (~> 1.0) 50 | jekyll-optional-front-matter (0.3.2) 51 | jekyll (>= 3.0, < 5.0) 52 | jekyll-sass-converter (1.5.2) 53 | sass (~> 3.4) 54 | jekyll-watch (2.2.1) 55 | listen (~> 3.0) 56 | jemoji (0.12.0) 57 | gemoji (~> 3.0) 58 | html-pipeline (~> 2.2) 59 | jekyll (>= 3.0, < 5.0) 60 | kramdown (1.17.0) 61 | liquid (4.0.3) 62 | listen (3.2.1) 63 | rb-fsevent (~> 0.10, >= 0.10.3) 64 | rb-inotify (~> 0.9, >= 0.9.10) 65 | mercenary (0.3.6) 66 | mini_portile2 (2.5.1) 67 | minitest (5.14.1) 68 | nokogiri (1.11.4) 69 | mini_portile2 (~> 2.5.0) 70 | racc (~> 1.4) 71 | nokogumbo (2.0.2) 72 | nokogiri (~> 1.8, >= 1.8.4) 73 | parallel (1.19.2) 74 | pathutil (0.16.2) 75 | forwardable-extended (~> 2.6) 76 | public_suffix (4.0.5) 77 | racc (1.5.2) 78 | rainbow (3.0.0) 79 | rb-fsevent (0.10.4) 80 | rb-inotify (0.10.1) 81 | ffi (~> 1.0) 82 | rouge (3.20.0) 83 | safe_yaml (1.0.5) 84 | sass (3.7.4) 85 | sass-listen (~> 4.0.0) 86 | sass-listen (4.0.0) 87 | rb-fsevent (~> 0.9, >= 0.9.4) 88 | rb-inotify (~> 0.9, >= 0.9.7) 89 | thread_safe (0.3.6) 90 | typhoeus (1.4.0) 91 | ethon (>= 0.9.0) 92 | tzinfo (1.2.7) 93 | thread_safe (~> 0.1) 94 | yell (2.2.2) 95 | zeitwerk (2.3.0) 96 | 97 | PLATFORMS 98 | ruby 99 | 100 | DEPENDENCIES 101 | html-pipeline (~> 2.5) 102 | html-proofer (~> 3.6) 103 | jekyll (~> 3.4) 104 | jekyll-optional-front-matter (~> 0.1) 105 | jemoji (~> 0.8) 106 | nokogiri (~> 1.11) 107 | 108 | BUNDLED WITH 109 | 2.1.4 110 | -------------------------------------------------------------------------------- /features.schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-07/schema#", 3 | "$id": "https://github.com/WebAssembly/website/raw/main/features.schema.json", 4 | "title": "WebAssembly feature table", 5 | "type": "object", 6 | "definitions": { 7 | "feature-info": { 8 | "type": "object", 9 | "properties": { 10 | "description": { "type": "string" }, 11 | "url": { "type": "string", "format": "uri-reference" }, 12 | "phase": { 13 | "anyOf": [ 14 | { "type": "integer", "minimum": 1 }, 15 | { "const": "inactive" } 16 | ] 17 | } 18 | }, 19 | "additionalProperties": false, 20 | "required": ["description", "url", "phase"] 21 | }, 22 | "browser-features": { 23 | "type": "object", 24 | "properties": { 25 | "url": { "type": "string", "format": "uri" }, 26 | "logo": { "type": "string", "format": "uri-reference" }, 27 | "features": { 28 | "type": "object", 29 | "additionalProperties": { "$ref": "#/definitions/status" } 30 | } 31 | }, 32 | "additionalProperties": false, 33 | "required": ["url", "logo", "features"] 34 | }, 35 | "status": { 36 | "title": "Status of this feature", 37 | "anyOf": [ 38 | { "$ref": "#/definitions/status-na" }, 39 | { "$ref": "#/definitions/status-supported" }, 40 | { "$ref": "#/definitions/status-unsupported" }, 41 | { "$ref": "#/definitions/status-flag" }, 42 | { "$ref": "#/definitions/status-version" }, 43 | { "$ref": "#/definitions/status-note" } 44 | ] 45 | }, 46 | "status-na": { "type": "null", "title": "Not applicable" }, 47 | "status-supported": { 48 | "const": true, 49 | "title": "Supported in unknown version" 50 | }, 51 | "status-unsupported": { "const": false, "title": "Unsupported" }, 52 | "status-flag": { "const": "flag", "title": "Flag required" }, 53 | "status-version": { 54 | "type": "string", 55 | "title": "Supported in this version", 56 | "minLength": 1 57 | }, 58 | "status-note": { 59 | "type": "array", 60 | "items": [ 61 | { 62 | "anyOf": [ 63 | { "$ref": "#/definitions/status-na" }, 64 | { "$ref": "#/definitions/status-supported" }, 65 | { "$ref": "#/definitions/status-unsupported" }, 66 | { "$ref": "#/definitions/status-flag" }, 67 | { "$ref": "#/definitions/status-version" } 68 | ] 69 | }, 70 | { "type": "string", "title": "Attached note", "minLength": 1 } 71 | ], 72 | "additionalItems": false, 73 | "minItems": 2, 74 | "maxItems": 2 75 | } 76 | }, 77 | "properties": { 78 | "$schema": { "type": "string", "format": "uri-reference" }, 79 | "features": { 80 | "type": "object", 81 | "additionalProperties": { "$ref": "#/definitions/feature-info" } 82 | }, 83 | "browsers": { 84 | "type": "object", 85 | "additionalProperties": { "$ref": "#/definitions/browser-features" } 86 | } 87 | }, 88 | "additionalProperties": false, 89 | "required": ["features", "browsers"] 90 | } 91 | -------------------------------------------------------------------------------- /getting-started/developers-guide.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: getting-started 3 | --- 4 | 5 | # I want to… 6 | 7 | ## Compile a WebAssembly module from… 8 | 9 | (This list is in alphabetical order.) 10 | 11 | - [Ada](https://github.com/godunko/adawebpack) 12 | - [AssemblyScript (a TypeScript-like syntax)](https://assemblyscript.org/introduction.html) 13 | - C/C++ 14 | - [starting from scratch](https://developer.mozilla.org/en-US/docs/WebAssembly/C_to_wasm) 15 | - [library that I want to port to the Web](https://developer.mozilla.org/en-US/docs/WebAssembly/existing_C_to_wasm) 16 | - [C#](https://learn.microsoft.com/en-us/aspnet/core/blazor/tutorials) 17 | - [Cobol](https://github.com/cloudflare/cobweb) 18 | - [D](https://wiki.dlang.org/Generating_WebAssembly_with_LDC) 19 | - Dart 20 | - [via Flutter](https://flutter.dev/wasm) 21 | - [F#](https://fsbolero.io/docs/) 22 | - Go 23 | - [with full language support](https://pkg.go.dev/cmd/compile#hdr-WebAssembly_Directives) 24 | - [targeting minimal size](https://tinygo.org/docs/guides/webassembly/) 25 | - [Grain](https://grain-lang.org/docs/) 26 | - Haskell 27 | - [GHC WebAssembly backend](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/wasm.html) 28 | - [Asterius](https://asterius.netlify.app/) 29 | - Java 30 | - [TeaVM](https://teavm.org) 31 | - [j2wasm](https://github.com/google/j2cl/blob/master/docs/getting-started-j2wasm.md) 32 | - [Kotlin](https://kotl.in/wasm) 33 | - [Lua](https://github.com/ysugimoto/webassembly-lua) 34 | - [Moonbit](https://www.moonbitlang.com/) 35 | - [Pascal](https://wiki.freepascal.org/WebAssembly/Compiler) 36 | - [PHP](https://github.com/seanmorris/php-wasm) 37 | - Python 38 | - [Pyodide](https://pyodide.org/en/stable/) 39 | - [Nuitka (py2wasm)](https://github.com/wasmerio/py2wasm) 40 | - [R](https://docs.r-wasm.org/webr/latest/) 41 | - [RemObjects Elements](https://docs.elementscompiler.com/Platforms/WebAssembly/) 42 | - [Ruby](http://github.com/ruby/ruby.wasm) 43 | - [Rust](https://developer.mozilla.org/en-US/docs/WebAssembly/Rust_to_wasm) 44 | - [Scala.js](https://www.scala-js.org/doc/project/webassembly.html) 45 | - [Scheme](https://github.com/cisco/ChezScheme) 46 | - [Swift](https://swiftwasm.org/) 47 | - [Zig](https://ziglang.org/documentation/master/#WebAssembly) 48 | 49 | ## Use the compiled WebAssembly… 50 | 51 | - [from JavaScript code](https://developer.mozilla.org/en-US/docs/WebAssembly/Loading_and_running) 52 | - [as a CLI application](https://github.com/bytecodealliance/wasmtime/blob/master/docs/WASI-tutorial.md) 53 | - [from Node.js (with access to system resources)](https://nodejs.org/api/wasi.html) 54 | - [from Java code](https://www.graalvm.org/webassembly/) 55 | 56 | ## Inspect WebAssembly… 57 | 58 | - [with Chrome DevTools](https://developers.google.com/web/updates/2020/12/webassembly) 59 | - [with GDB/LLDB](https://hacks.mozilla.org/2019/09/debugging-webassembly-outside-of-the-browser/) 60 | - [as a disassembled format](https://github.com/WebAssembly/wabt#running-wasm2wat) 61 | - [as a human-readable pseudo-code](https://v8.dev/blog/wasm-decompile) 62 | 63 | ## Something missing? 64 | 65 | Coming from a language or targeting an environment not listed here? Please 66 | [raise an issue](https://github.com/WebAssembly/website)! 67 | -------------------------------------------------------------------------------- /features.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | # Feature Status 6 | 7 | In November 2017, WebAssembly CG members representing four browsers, Chrome, 8 | Edge, Firefox, and WebKit, reached consensus that the design of the initial 9 | (MVP) WebAssembly API and binary format is complete to the extent that no 10 | further design work is possible without implementation experience and 11 | significant usage. 12 | 13 | After the initial release, WebAssembly has been gaining new features through the 14 | [standardization process](https://github.com/WebAssembly/meetings/blob/master/process/phases.md). 15 | For the complete list of current proposals and their respective stages, check 16 | out the 17 | [`WebAssembly/proposals` repo](https://github.com/WebAssembly/proposals). 18 | 19 | 20 | 23 | 26 | 29 | 32 | 33 | 36 | 37 | The table below aims to track implemented features in popular engines: 38 | 39 |
40 |
41 |
42 | 43 | 44 | 45 | 46 | 47 | To detect supported features at runtime from JavaScript, check out the 48 | [`wasm-feature-detect` library](https://github.com/GoogleChromeLabs/wasm-feature-detect), 49 | which powers the "Your browser" column above. 50 | -------------------------------------------------------------------------------- /css/webassembly.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/edge.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /getting-started/advanced-tools.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: getting-started 3 | --- 4 | 5 | # Advanced Tools 6 | 7 | WebAssembly is supported by a number of tools to help developers build and 8 | process source files and generated binary content. If you're a compiler writer, 9 | enjoy low level coding or just want to experiment with the raw WebAssembly 10 | format, these tools are for you. 11 | 12 | There are currently two distinct sets of tools that are of interest to compiler 13 | writers or developers who want to work with WebAssembly binary generated by 14 | other tools like [Emscripten](https://kripken.github.io/emscripten-site/): 15 | 16 | - [WABT](https://github.com/WebAssembly/wabt) - The WebAssembly Binary Toolkit 17 | - [Binaryen](https://github.com/WebAssembly/binaryen) - Compiler and toolchain 18 | infrastructure 19 | 20 | ## WABT: The WebAssembly Binary Toolkit 21 | 22 | WABT (we pronounce it "wabbit") is a suite of tools for WebAssembly, including: 23 | 24 | ### wasm2wat tool 25 | 26 | This is a command line tool that takes a binary file as input and generates an 27 | output file containing the readable text. 28 | 29 | Developers could edit or manipulate the text file in some other way and convert 30 | it back into the binary format for things like trying out optimization 31 | algorithms, tracing, inserting debugging hooks, etc. 32 | 33 | ### wat2wasm tool 34 | 35 | This is a command line tool that performs the inverse of **wasm2wast**, i.e. it 36 | converts files from the WebAssembly test format into WebAssembly binaries. 37 | 38 | Using **wasm2wat** and **wat2wasm** together allows lossless round tripping of 39 | WebAssembly binaries, and provides developers with a convenient way to 40 | manipulate the content of WebAssembly binaries using external tools. 41 | 42 | ### wasm-objdump tool 43 | 44 | This is a command line tool for inspecting WebAssembly binary files. It works in 45 | a similar fashion to that tradition UNIX objdump and can, amongst other things, 46 | be used to disassemble to code in a WebAssembly binary. 47 | 48 | #### wasm-interp tool 49 | 50 | This is an interpreter that lets developers run a WebAssembly binary from the 51 | command line stand-alone. It implements a stack-machine based interpreter that 52 | interprets the WebAssembly binary directly. This differs from how a browser 53 | would JIT the WebAssembly binary into native code for its target architecture at 54 | load time. 55 | 56 | The interpreter can be useful for running unit tests, validating WebAssembly 57 | binary files, etc. outside of a browser environment. 58 | 59 | ## Binaryen 60 | 61 | [Binaryen](https://github.com/WebAssembly/binaryen) is a comprehensive set of 62 | tools with supporting infrastructure for use as the backend of compilers that 63 | are targeting WebAssembly as an output format. It has a C API and implements its 64 | own internal intermediate representation 65 | ([IR](https://en.wikipedia.org/wiki/Intermediate_representation)) of program 66 | logic and can perform a number of optimizations on the IR, support 67 | parallelization of code generation, etc. 68 | 69 | For example, binaryen is used as part of the compiler 70 | **[asm2wasm](https://github.com/WebAssembly/binaryen/blob/master/src/asm2wasm.h)** 71 | that can convert asm.js files into WebAssembly files. It's also used for 72 | supporting the [LLVM](https://llvm.org/) compiler infrastructure generation of 73 | WebAssembly and compilation from [Rust](https://www.rust-lang.org/en-US/). 74 | 75 | Developers working on compilers, advanced optimization techniques and so forth 76 | should take advantage of binaryen and its tools that include a shell that can 77 | load and interpret WebAssembly code, assembler and disassembler, converters for 78 | asm.js and LLVM .s files into WebAssembly and so on. 79 | 80 | Tool developers are highly encouraged to explore the full set of functionality 81 | implemented by binaryen. 82 | -------------------------------------------------------------------------------- /_posts/2025-03-20-wasm-2.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Wasm 2.0 Completed' 3 | author: 'Andreas Rossberg' 4 | --- 5 | 6 | # Wasm 2.0 Completed 7 | 8 | _Published on March 20, 2025 by 9 | [Andreas Rossberg](https://github.com/rossberg)._ 10 | 11 | As of last December, release 2.0 of the Wasm specification is “official”! 12 | 13 | ![Screenshot of W3C site](/assets/wasm2_0.png) 14 | 15 | If you have been following the developments of the Wasm standard, then version 16 | 2.0 may sound like rather old news to you. And indeed, the Wasm Community and 17 | Working Groups had reached consensus and finished the specification in 18 | early 2022. All major implementations have been shipping 2.0 for even longer. 19 | But for a variety of non-technical reasons, it took a while for it to advance 20 | through the W3C process and reach the status of “Candidate Recommendation”. 21 | 22 | With the advent of 2.0, the Working Group is switching to a so-called 23 | “evergreen” model for future releases. That means that the Candidate 24 | Recommendation will be updated in place when we create new versions of the 25 | language, without ever technically moving it to the final Recommendation state. 26 | For all intents and purposes, the latest 27 | [Candidate Recommendation Draft](https://www.w3.org/TR/wasm-core-2/) is 28 | considered to be the current standard, representing the consensus of the 29 | Community Group and Working Group. (If this sounds odd, that’s mostly because 30 | the W3C's document terminology does not quite match this more flexible process, 31 | which has recently been adopted by several working groups.) 32 | 33 | For the most up-to-date version of the current specification, we recommend 34 | looking at the documents hosted on our 35 | [GitHub page](https://webassembly.github.io/spec/). This always includes the 36 | latest fixes and offers multiple different formats for reading and browsing. 37 | 38 | For those who are not following the evolution of Wasm as closely, here is the 39 | summary of the additions in version 2.0 of the language: 40 | 41 | - [_Vector instructions_](https://github.com/webassembly/simd): With a massive 42 | 236 new instructions — more than the total number Wasm had before — it now 43 | supports 128-bit wide SIMD (single instruction, multiple data) functionality 44 | of contemporary CPUs, like Intel’s SSE or ARM’s SVE. This helps speeding up 45 | certain classes of compute-intense applications like audio/video codecs, 46 | machine learning, and some cryptography. 47 | 48 | 49 | 50 | - [_Bulk memory instructions_](https://github.com/WebAssembly/bulk-memory-operations): 51 | A set of new instructions allows faster copying and initialization of regions 52 | of memory or ranges of tables. 53 | 54 | 55 | 56 | - [_Multi-value results_](https://github.com/WebAssembly/multi-value): 57 | Instructions, blocks, and functions can now return more than one result value, 58 | sometimes supporting faster calling conventions and avoiding indirections. In 59 | addition, block instructions now also can have inputs, enabling new program 60 | transformations. 61 | 62 | 63 | 64 | - [_Reference types_](https://github.com/WebAssembly/reference-types): 65 | References to functions or pointers to external objects (e.g., JavaScript 66 | values) become available as opaque first-class values. Tables are repurposed 67 | as a general storage for such reference values, and new instructions allow 68 | accessing and mutating tables in Wasm code. In addition, modules now may 69 | define multiple tables of different types. 70 | 71 | 72 | 73 | - [_Non-trapping conversions_](https://github.com/WebAssembly/nontrapping-float-to-int-conversions): 74 | Additional instructions allow the conversion from float to integer types 75 | without the risk of trapping unexpectedly. 76 | 77 | 78 | 79 | - [_Sign extension instructions_](https://github.com/WebAssembly/sign-extension-ops): 80 | A new group of instructions allows directly extending the width of signed 81 | integer value. Previously that was only possible when reading from memory. 82 | 83 | 84 | 85 | It goes without saying that Wasm 2.0 is fully backwards-compatible with 1.0, 86 | that is, every valid program remains valid and preserves its behaviour. 87 | 88 | In a future post we will take a look at Wasm 3.0, which is already around the 89 | corner at this point! 90 | -------------------------------------------------------------------------------- /getting-started/js-api.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: getting-started 3 | --- 4 | 5 | # Understanding the JS API 6 | 7 | _We assume here that you already have a .wasm module, whether 8 | [compiled from a C/C++ program](/getting-started/developers-guide/) or 9 | [assembled directly from s-exprs](/getting-started/advanced-tools/#wabt-the-webassembly-binary-toolkit)._ 10 | 11 | ## Loading and running 12 | 13 | While there are [future plans](/docs/future-features/) to allow WebAssembly 14 | modules to be loaded just like ES6 modules (using `