- An interface to access system resources such as WASI
- A runtime to which we also have support for above interface and C/C++/Rust to wasm compiler
To run WebAssembly outside of the browser we need a way to talk to the system because we want support for features such as sockets, threads, files.
For that we need a system interface and this is where WebAssembly System Interface
WASI comes into play, which is a system interface for the WebAssembly platform.
Wasmer is a WebAssembly runtime having support for system interface
WASI and C/C++/Rust's to wasm compiler such as Emscripten, Clang, Rust, Clang etc.
Features of Wasmer
- Secure by default. No file, network, or environment access, unless explicitly enabled.
- Supports WASI and Emscripten out of the box.
- Fast. Run WebAssembly at near-native speeds.
- Embeddable in multiple programming languages
- Compliant with latest WebAssembly Proposals (SIMD, Reference Types, Threads, ...)
Wasmer runtime run the following command
curl https://get.wasmer.io -sSfL | sh
wasmer run test.wasm
Next we will see some examples for non-browser case
Link for browser case can be found here