WebAssembly is a virtual machine (VM) designed for client, server and blockchain applications. It is used to run canister smart contracts on the Internet Computer (IC). WebAssembly runs portable byte code instructions that are created by compiling software code written in programming languages such as Rust and Motoko. Because it's faster, more efficient, and more portable than the alternatives, WebAssembly is key to building efficient applications on the internet.
WebAssembly has quickly established itself as the internet's favorite virtual machine.
WebAssembly used in the IC
WebAssembly (or "WASM") was co-designed by Andreas Rossberg, who joined the Dfinity Foundation early in 2017 to work on its canister smart contract execution environment, and the Motoko language. The standard is maintained by the World Wide Web Consortium.
The Internet Computer uses the WebAssembly VM to run its canister smart contracts for a number of reasons, including:
- It is formally specified, which increases its security.
- It provides near-native performance, greatly improving smart contract efficiency.
- It is targeted by LLVM, which means large numbers of programming languages can easily be used for smart contract creation.
- It has been very widely adopted as the new standard for computation on the Web, and consequently a massive decentralized R&D effort constantly evolves and improves the standard, and a large variety of virtual machine implementations have been created.