* Move all examples to a top-level directory This commit moves all API examples (Rust and C) to a top-level `examples` directory. This is intended to make it more discoverable and conventional as to where examples are located. Additionally all examples are now available in both Rust and C to see how to execute the example in the language you're familiar with. The intention is that as more languages are supported we'd add more languages as examples here too. Each example is also accompanied by either a `*.wat` file which is parsed as input, or a Rust project in a `wasm` folder which is compiled as input. A simple driver crate was also added to `crates/misc` which executes all the examples on CI, ensuring the C and Rust examples all execute successfully.
15 lines
650 B
Markdown
15 lines
650 B
Markdown
# Examples of the `wasmtime` API
|
|
|
|
This directory contains a number of examples of using the `wasmtime` API from
|
|
different languages. Currently examples are all in Rust and C using the
|
|
`wasmtime` crate or the wasmtime embedding API.
|
|
|
|
Each example is available in both C and in Rust. Examples are accompanied with a
|
|
`*.wat` file which is the wasm input, or a Rust project in a `wasm` folder which
|
|
is the source code for the original wasm file.
|
|
|
|
Rust examples can be executed with `cargo run --example $name`, and C examples
|
|
need to be compiled using your system compiler and appropriate header files.
|
|
|
|
For more information see the examples themselves!
|