wasmer
TLDR
Run a WebAssembly file
SYNOPSIS
wasmer [command] [options] [input] [args...]
DESCRIPTION
wasmer is a WebAssembly runtime for running Wasm modules outside the browser. It supports WASI for system access and provides fast, secure execution with multiple compiler backends.
The runtime is secure by default, with no access to files, network, or environment unless explicitly enabled. Wasmer can run packages from its registry or local .wasm files.
Compiler backends offer different tradeoffs: Singlepass provides fastest compilation, Cranelift balances compilation and execution speed (default), and LLVM produces most optimized code.
Install via: `curl https://get.wasmer.io -sSfL | sh`
PARAMETERS
-i, --invoke function
Function to invoke.-e, --entrypoint module
Entrypoint module for packages.--stack-size size
Stack size (default: 1048576).--http-client
Allow HTTP requests.--wasmer-dir dir
Wasmer home directory.--cache-dir dir
Cache directory.--backend backend
Compiler backend: cranelift, llvm, singlepass.-v, --verbose
Verbose output.-h, --help
Display help.--version
Display version.
COMMANDS
run: Execute a WebAssembly file or package.
compile: Compile to native code.
validate: Validate WebAssembly file.
install: Install a package.
publish: Publish a package to registry.
config: Manage configuration.
self-update: Update Wasmer.
CAVEATS
WASI support varies by module. Some system interfaces require explicit flags to enable. Package registry requires account for publishing. Ahead-of-time compiled modules are platform-specific.
HISTORY
Wasmer was created by Syrus Akbary and launched in 2018. It became one of the leading standalone WebAssembly runtimes, supporting multiple languages and platforms. The project includes a package registry for distributing Wasm applications.


