File: cli.md

package info (click to toggle)
rust-wasmtime 26.0.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 48,504 kB
  • sloc: ansic: 4,003; sh: 561; javascript: 542; cpp: 254; asm: 175; ml: 96; makefile: 55
file content (24 lines) | stat: -rw-r--r-- 807 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Using the `wasmtime` CLI

In addition to the embedding API which allows you to use Wasmtime as a
library, the Wasmtime project also provides a `wasmtime` CLI tool to conveniently
execute WebAssembly modules from the command line.

This section will provide a guide to the `wasmtime` CLI and major functionality
that it contains. In short, however, you can execute a WebAssembly file
(actually doing work as part of the `start` function) like so:

```sh
$ wasmtime foo.wasm
```

Or similarly if you want to invoke a "start" function, such as with WASI
modules, you can execute

```sh
$ wasmtime --invoke _start foo.wasm
```

For more information be sure to check out [how to install the
CLI](cli-install.md), [the list of options you can
pass](cli-options.md), and [how to enable logging](cli-logging.md).