The WasmEdge Runtime supports all standard WebAssembly features, proposed WebAssembly extensions, as well as its own set of extensions specifically designed for cloud and edge applications.
If you want WasmEdge applications to call native libraries, you can do that by registering a host function from the WasmEdge C or Go API.
WasmEdge supports optional WebAssembly features and proposals. Those proposals are likely to become official WebAssembly specifications in the future. WasmEdge supports the following proposals.
- WASI (WebAssembly Systems Interface) spec. WasmEdge has supported the WASI spec for WebAssembly programs to interact with the host Linux operating system securely.
- Reference Types. It allows WebAssembly programs to exchange data with host applications and operating systems.
- Bulk memory operations. The WebAssembly program sees faster memory access and performs better with bulk memory operations.
- SIMD (Single instruction, multiple data). For modern devices with multiple CPU cores, the SIMD allows data processing programs to take advantage of the CPUs fully. SIMD could significantly enhance the performance of data applications.
Meanwhile, the WasmEdge team is exploring the wasi-socket proposal to support network access in WebAssembly programs.
A key differentiator of WasmEdge from other WebAssembly VMs is its support for non-standard extensions. The WASI spec provides a mechanism for developers to extend WebAssembly VMs efficiently and securely. The WasmEdge team created the following WASI-like extensions based on real-world customer demands.
- Tensorflow. Developers can write Tensorflow inference functions using a simple Rust API, and then run the function securely and at native speed inside WasmEdge.
- Other AI frameworks. Besides Tensorflow, the Second State team is building WASI-like extensions for AI frameworks such as ONNX and Tengine for WasmEdge.
- Image processing. WasmEdge uses native libraries to manipulate images for computer vision tasks.
- KV Storage. The WasmEdge storage interface allows WebAssembly programs to read and write a key value store.
- Network sockets. WasmEdge applications can access the network sockets for TCP and HTTP connections.
- Command interface. WasmEdge enables webassembly functions execute native commands in the host operating system. It supports passing arguments, environment variables, STDIN / STDOUT pipes, and security policies for host access.
- Ethereum. The WasmEdge Ewasm extension supports Ethereum smart contracts compiled to WebAssembly. It is a leading implementation for Ethereum flavored WebAssembly (Ewasm).
- Substrate. The Pallet allows WasmEdge to act as an Ethereum smart contract execution engine on any Substrate based blockchains.