xref: /wasmtime-44.0.1/docs/cli.md (revision 92cfda1b)
1bf526b62SAlex Crichton# Using the `wasmtime` CLI
2bf526b62SAlex Crichton
38caa5a94SAlex CrichtonIn addition to the embedding API which allows you to use Wasmtime as a
4fbe29da5SDan Gohmanlibrary, the Wasmtime project also provides a `wasmtime` CLI tool to conveniently
58caa5a94SAlex Crichtonexecute WebAssembly modules from the command line.
68caa5a94SAlex Crichton
78caa5a94SAlex CrichtonThis section will provide a guide to the `wasmtime` CLI and major functionality
88caa5a94SAlex Crichtonthat it contains. In short, however, you can execute a WebAssembly file
98caa5a94SAlex Crichton(actually doing work as part of the `start` function) like so:
108caa5a94SAlex Crichton
11*92cfda1bSVictor Adossi```console
12*92cfda1bSVictor Adossiwasmtime foo.wasm
138caa5a94SAlex Crichton```
148caa5a94SAlex Crichton
158caa5a94SAlex CrichtonOr similarly if you want to invoke a "start" function, such as with WASI
168caa5a94SAlex Crichtonmodules, you can execute
178caa5a94SAlex Crichton
18*92cfda1bSVictor Adossi```console
19*92cfda1bSVictor Adossiwasmtime --invoke _start foo.wasm
208caa5a94SAlex Crichton```
218caa5a94SAlex Crichton
228caa5a94SAlex CrichtonFor more information be sure to check out [how to install the
23ac0ee271SDan GohmanCLI](cli-install.md), [the list of options you can
24ac0ee271SDan Gohmanpass](cli-options.md), and [how to enable logging](cli-logging.md).
25