Add tutorial for building and running hello-world.wasm (#1285)

* Add tutorial for building and running hello-world.wasm

* Fix issues with directory trees in last commit

* Add more information on various ways of creating .wasm files and running them with Wasmtime

* Fix internal links and add more information on Wasmtime CLI installation
This commit is contained in:
Ifenna Ozoekwe-Awagu
2020-03-12 11:49:31 -04:00
committed by GitHub
parent 23916329bd
commit 67b3a890dc
2 changed files with 87 additions and 2 deletions

View File

@@ -1,3 +1,28 @@
# Running `hello-world.wasm` with Wasmtime
... more coming soon
## Installing Wasmtime
The Wasmtime CLI can be installed on Linux and macOS with a small install
script:
```sh
$ curl https://wasmtime.dev/install.sh -sSf | bash
```
You can find more information about installing the Wasmtime CLI in the
[CLI Installation section](./cli-install.md)
## Running `hello-world.wasm`
There are a number of ways to run a `.wasm` file with Wasmtime. In this
tutorial, we'll be using the CLI, Wasmtime can also be embedded in your
applications. More information on this can be found in the
[Embedding Wasmtime section](./embed.md).
If you've built the `hello-world.wasm` file (the instructions for doing so are in the
[previous section](./tutorial-create-hello-world.md)),
you can run it with Wasmtime from the command line like so:
```sh
$ wasmtime target/wasm32-wasi/debug/hello-world.wasm
```