49 releases (stable)

4.3.5 Jul 16, 2024
4.3.2 Jun 11, 2024
4.2.6 Mar 7, 2024
4.2.4 Dec 5, 2023
1.0.1 Jan 16, 2021

#1093 in WebAssembly

Download history 275/week @ 2024-04-03 243/week @ 2024-04-10 527/week @ 2024-04-17 357/week @ 2024-04-24 129/week @ 2024-05-01 360/week @ 2024-05-08 138/week @ 2024-05-15 381/week @ 2024-05-22 307/week @ 2024-05-29 322/week @ 2024-06-05 332/week @ 2024-06-12 252/week @ 2024-06-19 263/week @ 2024-06-26 534/week @ 2024-07-03 323/week @ 2024-07-10 268/week @ 2024-07-17

1,452 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.
  • 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

~85MB
~1.5M SLoC