57 releases (stable)

new 5.0.3 Dec 7, 2024
5.0.2 Nov 25, 2024
5.0.0 Oct 29, 2024
4.4.0 Oct 4, 2024
1.0.1 Jan 16, 2021

#1185 in WebAssembly

Download history 148/week @ 2024-08-24 219/week @ 2024-08-31 348/week @ 2024-09-07 235/week @ 2024-09-14 241/week @ 2024-09-21 375/week @ 2024-09-28 259/week @ 2024-10-05 250/week @ 2024-10-12 235/week @ 2024-10-19 286/week @ 2024-10-26 364/week @ 2024-11-02 216/week @ 2024-11-09 109/week @ 2024-11-16 273/week @ 2024-11-23 158/week @ 2024-11-30 360/week @ 2024-12-07

945 downloads per month

MIT license

6.5MB
126K 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.
  • 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

~46–66MB
~1M SLoC