WebAssembly
WebAssembly (Wasm) is a low-level binary format that runs in the browser at near-native speed. You don't usually write it by hand: languages like Rust, C++ or Go compile to Wasm to bring heavy tasks (games, editing, AI) to the browser.
- Creado por W3C (consorcio)
- Año 2017
- Paradigma: Low-level · compiled
- Extensiones: .wasm, .wat
Para qué se usa
- High-performance web apps
- In-browser games
- Porting native code to the web
A favor
- Near-native speed
- Target of many languages
- Safe and portable
En contra
- Not hand-written
- Still evolving
- Indirect DOM access
Ecosistema
- Emscripten
- wasm-pack
- WASI
- wasmtime
- wat2wasm
Ejemplo
(module
(func (export "main") (result i32)
i32.const 42))