CLI Usage
This is the help output from the Wasmer CLI for wasmer --help :
1
WebAssembly standalone runtime.
2
​
3
USAGE:
4
wasmer <SUBCOMMAND>
5
​
6
FLAGS:
7
-h, --help Prints help information
8
-V, --version Prints version information
9
​
10
SUBCOMMANDS:
11
cache Wasmer cache
12
compile Compile a WebAssembly binary
13
config Get various configuration information needed to compile programs which use Wasmer
14
create-exe Compile a WebAssembly binary into a native executable
15
help Prints this message or the help of the given subcommand(s)
16
inspect Inspect a WebAssembly file
17
run Run a WebAssembly file. Formats accepted: wasm, wat
18
self-update Update wasmer to the latest version
19
validate Validate a WebAssembly binary
20
wast Run spec testsuite
Copied!

wasmer cache

1
USAGE:
2
wasmer cache <SUBCOMMAND>
3
​
4
FLAGS:
5
-h, --help Prints help information
6
-V, --version Prints version information
7
​
8
SUBCOMMANDS:
9
clean Clear the cache
10
dir Display the location of the cache
11
help Prints this message or the help of the given subcommand(s)
Copied!

wasmer compile

Compile a WebAssembly binary
1
USAGE:
2
wasmer compile [FLAGS] [OPTIONS] <FILE> -o <OUTPUT PATH>
3
​
4
FLAGS:
5
--enable-all Enable support for all pre-standard proposals
6
--enable-bulk-memory Enable support for the bulk memory proposal
7
--cranelift Use Cranelift compiler
8
--enable-verifier Enable compiler internal verification
9
-h, --help Prints help information
10
--universal Use Universal Engine
11
--llvm Use LLVM compiler
12
--enable-multi-value Enable support for the multi value proposal
13
--dylib Use Dynamic Library Engine
14
--staticlib Use Staticlib Engine
15
--enable-reference-types Enable support for the reference types proposal
16
--enable-simd Enable support for the SIMD proposal
17
--singlepass Use Singlepass compiler
18
--enable-threads Enable support for the threads proposal
19
-V, --version Prints version information
20
​
21
OPTIONS:
22
--header <HEADER PATH> Output path for generated header file
23
-o <OUTPUT PATH> Output file
24
-m <cpu-features>...
25
--llvm-debug-dir <llvm-debug-dir> LLVM debug directory, where IR and object files will be written to
26
--target <target-triple> Compilation Target triple
27
​
28
ARGS:
29
<FILE> Input file
Copied!

wasmer config

Get various configuration information needed to compile programs which use Wasmer
1
USAGE:
2
wasmer config [FLAGS]
3
​
4
FLAGS:
5
--bindir Directory containing Wasmer executables
6
--cflags C compiler flags for files that include Wasmer headers
7
-h, --help Prints help information
8
--includedir Directory containing Wasmer headers
9
--libdir Directory containing Wasmer libraries
10
--libs Libraries needed to link against Wasmer components
11
--pkg-config It outputs the necessary details for compiling and linking a program to Wasmer, using the `pkg-
12
config` format
13
--prefix Print the installation prefix
14
-V, --version Prints version information
Copied!

wasmer create-exe

Compile a WebAssembly binary into a native executable
1
USAGE:
2
wasmer create-exe [FLAGS] [OPTIONS] <FILE> -o <OUTPUT PATH>
3
​
4
FLAGS:
5
--enable-all Enable support for all pre-standard proposals
6
--enable-bulk-memory Enable support for the bulk memory proposal
7
--cranelift Use Cranelift compiler
8
--enable-verifier Enable compiler internal verification
9
-h, --help Prints help information
10
--llvm Use LLVM compiler
11
--enable-multi-value Enable support for the multi value proposal
12
--enable-reference-types Enable support for the reference types proposal
13
--enable-simd Enable support for the SIMD proposal
14
--singlepass Use Singlepass compiler
15
--enable-threads Enable support for the threads proposal
16
-V, --version Prints version information
17
​
18
OPTIONS:
19
-o <OUTPUT PATH> Output file
20
-m <cpu-features>...
21
-l <libraries>... Additional libraries to link against. This is useful for fixing linker
22
errors that may occur on some systems
23
--llvm-debug-dir <llvm-debug-dir> LLVM debug directory, where IR and object files will be written to
24
--target <target-triple> Compilation Target triple
25
​
26
ARGS:
27
<FILE> Input file
Copied!

wasmer inspect

Inspect a WebAssembly file
1
USAGE:
2
wasmer inspect [FLAGS] [OPTIONS] <FILE>
3
​
4
FLAGS:
5
--enable-all Enable support for all pre-standard proposals
6
--enable-bulk-memory Enable support for the bulk memory proposal
7
--cranelift Use Cranelift compiler
8
--enable-verifier Enable compiler internal verification
9
-h, --help Prints help information
10
--universal Use Universal Engine
11
--llvm Use LLVM compiler
12
--enable-multi-value Enable support for the multi value proposal
13
--dylib Use Dynamic Library Engine
14
--staticlib Use Staticlib Engine
15
--enable-reference-types Enable support for the reference types proposal
16
--enable-simd Enable support for the SIMD proposal
17
--singlepass Use Singlepass compiler
18
--enable-threads Enable support for the threads proposal
19
-V, --version Prints version information
20
​
21
OPTIONS:
22
--llvm-debug-dir <llvm-debug-dir> LLVM debug directory, where IR and object files will be written to
23
​
24
ARGS:
25
<FILE> File to validate as WebAssembly
Copied!

wasmer run

Run a WebAssembly file. Formats accepted: wasm, wat
1
USAGE:
2
wasmer run [FLAGS] [OPTIONS] <FILE> [--] [--]...
3
​
4
FLAGS:
5
--enable-all Enable support for all pre-standard proposals
6
--enable-bulk-memory Enable support for the bulk memory proposal
7
--cranelift Use Cranelift compiler
8
--disable-cache Disable the cache
9
--enable-verifier Enable compiler internal verification
10
-h, --help Prints help information
11
--universal Use Universal Engine
12
--llvm Use LLVM compiler
13
--enable-multi-value Enable support for the multi value proposal
14
--dylib Use Dynamic Library Engine
15
--staticlib Use Staticlib Engine
16
--enable-reference-types Enable support for the reference types proposal
17
--enable-simd Enable support for the SIMD proposal
18
--singlepass Use Singlepass compiler
19
--enable-threads Enable support for the threads proposal
20
-V, --version Prints version information
21
​
22
OPTIONS:
23
--dir <DIR>... WASI pre-opened directory
24
--mapdir <GUEST_DIR:HOST_DIR>... Map a host directory to a different location for the wasm module
25
--env <KEY=VALUE>... Pass custom environment variables
26
-i, --invoke <invoke> Invoke a specified function
27
--llvm-debug-dir <llvm-debug-dir> LLVM debug directory, where IR and object files will be written to
28
​
29
ARGS:
30
<FILE> File to run
31
<-->... Application arguments
Copied!

wasmer self-update

It auto-updates Wasmer to the most-recent published version.

wasmer validate <path>

Validate a WebAssembly binary
1
USAGE:
2
wasmer validate [FLAGS] [OPTIONS] <FILE>
3
​
4
FLAGS:
5
--enable-all Enable support for all pre-standard proposals
6
--enable-bulk-memory Enable support for the bulk memory proposal
7
--cranelift Use Cranelift compiler
8
--enable-verifier Enable compiler internal verification
9
-h, --help Prints help information
10
--universal Use Universal Engine
11
--llvm Use LLVM compiler
12
--enable-multi-value Enable support for the multi value proposal
13
--dylib Use Dynamic Library Engine
14
--staticlib Use Staticlib Engine
15
--enable-reference-types Enable support for the reference types proposal
16
--enable-simd Enable support for the SIMD proposal
17
--singlepass Use Singlepass compiler
18
--enable-threads Enable support for the threads proposal
19
-V, --version Prints version information
20
​
21
OPTIONS:
22
--llvm-debug-dir <llvm-debug-dir> LLVM debug directory, where IR and object files will be written to
23
​
24
ARGS:
25
<FILE> File to validate as WebAssembly
Copied!

wamser wast

Run spec testsuite
1
USAGE:
2
wasmer wast [FLAGS] [OPTIONS] <FILE>
3
​
4
FLAGS:
5
--enable-all Enable support for all pre-standard proposals
6
--enable-bulk-memory Enable support for the bulk memory proposal
7
--cranelift Use Cranelift compiler
8
--enable-verifier Enable compiler internal verification
9
-f, --fail-fast A flag to indicate wast stop at the first error or continue
10
-h, --help Prints help information
11
--universal Use Universal Engine
12
--llvm Use LLVM compiler
13
--enable-multi-value Enable support for the multi value proposal
14
--dylib Use Dynamic Library Engine
15
--staticlib Use Staticlib Engine
16
--enable-reference-types Enable support for the reference types proposal
17
--enable-simd Enable support for the SIMD proposal
18
--singlepass Use Singlepass compiler
19
--enable-threads Enable support for the threads proposal
20
-V, --version Prints version information
21
​
22
OPTIONS:
23
--llvm-debug-dir <llvm-debug-dir> LLVM debug directory, where IR and object files will be written to
24
​
25
ARGS:
26
<FILE> Wast file to run
Copied!
Last modified 4mo ago