41 releases (27 stable)

4.2.8 Apr 8, 2024
4.2.6 Mar 7, 2024
4.2.5 Jan 2, 2024
4.2.4 Dec 5, 2023
1.0.1 Jan 16, 2021

#1036 in WebAssembly

Download history 65/week @ 2023-12-24 108/week @ 2023-12-31 81/week @ 2024-01-07 36/week @ 2024-01-14 39/week @ 2024-01-21 89/week @ 2024-01-28 93/week @ 2024-02-04 105/week @ 2024-02-11 92/week @ 2024-02-18 205/week @ 2024-02-25 303/week @ 2024-03-03 250/week @ 2024-03-10 203/week @ 2024-03-17 217/week @ 2024-03-24 191/week @ 2024-03-31 258/week @ 2024-04-07

902 downloads per month

MIT license

6.5MB
118K SLoC

wasmer-cli Build Status Join Wasmer Slack MIT License

This crate is the Wasmer CLI.

The recommended way to install wasmer is via the wasmer-installer.

However, you can also install wasmer via Cargo (you will need to specify the compilers to use):

cargo install wasmer-cli --features "singlepass,cranelift"

Or by building it inside the codebase:

cargo build --release --features "singlepass,cranelift"

Features

The Wasmer supports the following features:

  • wat (default): support for executing WebAssembly text files.
  • wast(default): support for running wast test files.
  • cache (default): support or automatically caching compiled artifacts.
  • wasi (default): support for WASI.
  • emscripten (default): support for Emscripten.
  • singlepass: support for the Singlepass compiler.
  • cranelift: support for the Cranelift compiler.
  • llvm: support for the LLVM compiler.

CLI commands

Once you have Wasmer installed, you can start executing WebAssembly files easily:

Get the current Wasmer version:

wasmer -V

Execute a WebAssembly file:

wasmer run myfile.wasm

Compile a WebAssembly file:

wasmer compile myfile.wasm -o myfile.wasmu

Run a compiled WebAssembly file (fastest):

wasmer run myfile.wasmu

Dependencies

~82MB
~1.5M SLoC