You can install the Wasmer Standalone runtime by following the instructions below:
If you haven't done so already, install the Wasmer Command Line Interface (CLI) for macOS/Linux:
curl https://get.wasmer.io -sSfL | sh
Or you can use this PowerShell command if you are in Windows:
iwr https://win.wasmer.io -useb | iex
Once the Wasmer CLI is installed, you can run Wasm modules and WAPM packages directly from the command line!
In this example, we will be using Python compiled to WebAssembly. To do this we are going to use the
python/pythonpackage from wapm:
wasmer run python/python
Which should bring up the QuickJS prompt which you can then interact with. See an example below:
wasmer CLI running the WAPM Python package
Wasmer can also run standalone WASI or Emscripten Wasm apps, simply point
wasmer runto the .wasm file!
wasmer run my-emscripten-or-wasi-file.wasm
Next, we can take a look at the command line flags and arguments for the CLI, for more advanced usage.