# WebAssembly

> portable, efficient virtual machine and bytecode format for compiled code on the Web

**Wikidata**: [Q20155677](https://www.wikidata.org/wiki/Q20155677)  
**Wikipedia**: [English](https://en.wikipedia.org/wiki/WebAssembly)  
**Source**: https://4ort.xyz/entity/webassembly

## Summary
WebAssembly is a portable, efficient virtual machine and bytecode format for compiled code on the Web, designed to run code written in languages like C/C++/Rust at near-native speed in web browsers.

## Key Facts
- WebAssembly was created in 2015 as a portable, efficient virtual machine and bytecode format for compiled code on the Web.
- It was developed by the World Wide Web Consortium (W3C) with contributions from Microsoft, Google, Apple, and others.
- The first stable version was released as 1.0 on October 18, 2017.
- It has file extensions including .wast (text format) and .wasm (binary format).
- It is licensed under the Apache License.
- It was influenced by asm.js and Google Native Client.
- It received the Programming Languages Software Award in 2021.
- It's designed as an expression-oriented programming language.
- It uses the application/wasm media type.
- It's part of the WebAssembly System Interface (WASI) ecosystem.

### Q: What is WebAssembly and what is it used for?
A: WebAssembly is a portable, efficient virtual machine and bytecode format for compiled code on the Web, designed to run code written in languages like C/C++/Rust at near-native speed in web browsers.

### Q: How does WebAssembly compare to JavaScript?
A: WebAssembly provides near-native performance for compiled code while JavaScript is a scripting language that runs in the browser's engine, with WebAssembly used for performance-critical tasks.

### Q: What programming languages can compile to WebAssembly?
A: Languages like C, C++, Rust, and others can compile to WebAssembly, enabling cross-language compatibility on the web.

## Why It Matters
WebAssembly matters because it addresses the performance limitations of JavaScript by enabling near-native speed execution of compiled code in web browsers. It creates a universal runtime environment that allows code from various programming languages to run efficiently on the web, breaking language barriers and enabling complex applications to run in browsers without performance compromises. It has become a fundamental component of modern web development, supporting everything from game engines to enterprise applications and revolutionizing what can be achieved on the web.

## Notable For
- It's the first universal web bytecode format that enables near-native performance for compiled code.
- It was developed as a joint effort by major tech companies including Microsoft, Google, and Apple.
- It received the Programming Languages Software Award in 2021 for its impact on web performance.
- It's designed as an expression-oriented programming language that runs on a stack-based virtual machine.
- It's influenced by both asm.js and Google Native Client but represents a more comprehensive solution.

## Body
### Technical Overview
WebAssembly is a portable, efficient virtual machine and bytecode format designed to run compiled code on the Web. It operates as a stack-based virtual machine with a text format (.wast) and binary format (.wasm). The binary format uses the media type application/wasm.

### Development and Governance
WebAssembly was created in 2015 through a joint effort by the World Wide Web Consortium (W3C) with contributions from Microsoft, Google, Apple, and other organizations. The project is governed by the WebAssembly Working Group within the W3C.

### Versions and Evolution
The specification has evolved through multiple releases:
- Version 1.0 was released on October 18, 2017
- Version 1.1 was released on December 9, 2019
- Version 2.0 was released on June 1, 2022 (currently preferred)
- Version 1.0.0 and 2.0.0 are marked as stable releases

### Usage and Applications
WebAssembly is used for performance-critical applications on the web, including game engines, video processing, and scientific computing. It enables cross-language compatibility by allowing code from languages like C, C++, and Rust to run in web browsers.

### Technical Specifications
The format is based on the Apache License and uses a stack-oriented programming paradigm. It's influenced by asm.js and Google Native Client but provides a more comprehensive solution. The binary format has a specific identification pattern starting with 00 61 73 6d.

```json
{
  "@context": "https://schema.org",
  "@type": "Thing",
  "name": "WebAssembly",
  "description": "A portable, efficient virtual machine and bytecode format for compiled code on the Web",
  "url": "https://webassembly.org/",
  "sameAs": ["https://www.wikidata.org/wiki/Q328", "https://en.wikipedia.org/wiki/WebAssembly"],
  "additionalType": "bytecode, computing platform, file format, project"
}

## References

1. [Programming Languages Software Award](https://www.sigplan.org/Awards/Software/#2021_WebAssembly)
2. [Release 1.0. 2017](https://github.com/WebAssembly/spec/releases/tag/v1.0)
3. [Release 1.1. 2019](https://github.com/WebAssembly/spec/releases/tag/opam-1.1)
4. [Release 2.0. 2022](https://github.com/WebAssembly/spec/releases/tag/opam-2.0.0)
5. [Release 1.0.0. 2023](https://github.com/WebAssembly/spec/releases/tag/v1.0.0)
6. [Release 2.0.0. 2023](https://github.com/WebAssembly/spec/releases/tag/v2.0.0)
7. [Source](http://webassembly.org/roadmap/)
8. [Source](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiateStreaming)
9. [Source](http://km.aifb.kit.edu/services/crunchbase/)
10. Quora
11. [Source](https://developer.mozilla.org/en-US/docs/WebAssembly/Understanding_the_text_format)
12. [Source](https://golden.com/wiki/WebAssembly-WYXWZX)
13. [webassembly · GitHub Topics · GitHub](https://github.com/topics/webassembly)
14. [wasm · GitHub Topics · GitHub](https://github.com/topics/wasm)
15. [Can I use... Support tables for HTML5, CSS3, etc](https://caniuse.com/wasm)