WebAssembly
A portable, near-native-speed binary instruction format that several blockchains use as their smart contract execution engine.
- glossary
WebAssembly (Wasm) is "a binary instruction format for a stack-based virtual machine," originally built as "a portable compilation target for programming languages" that "aims to execute at native speed" in browsers and servers. Several blockchain ecosystems reuse this general-purpose, battle-tested runtime as their smart contract engine instead of designing a bespoke bytecode format: CosmWasm, the dominant platform across Cosmos SDK chains such as Osmosis, Neutron, and Injective, compiles smart contracts written in Rust down to Wasm and executes them on an optimized Wasm runtime. Using Wasm means any language with a Wasm compiler — Rust, C, C++, Go — can, in principle, target the chain, in contrast to Ethereum's Solidity-first EVM. For Web3 infrastructure built on-chain, including tokenized assets, the choice between a Wasm-based VM and the EVM affects which developer tooling and existing contracts port over without a rewrite.
Related keywords
- webassembly
- wasm
- cosmwasm
- wasm smart contracts
- stack-based virtual machine