You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Alex Crichton
20660cb386
|
7 months ago | |
---|---|---|
.. | ||
component | 8 months ago | |
fib-debug | 9 months ago | |
min-platform | 8 months ago | |
tokio | 9 months ago | |
wasi | 8 months ago | |
wasi-async | 7 months ago | |
CMakeLists.txt | 8 months ago | |
README.md | 2 years ago | |
async.cpp | 8 months ago | |
async.wat | 1 year ago | |
coredump.rs | 9 months ago | |
epochs.rs | 2 years ago | |
externref.rs | 8 months ago | |
externref.wat | 4 years ago | |
fuel.c | 8 months ago | |
fuel.rs | 9 months ago | |
fuel.wat | 1 year ago | |
gcd.c | 8 months ago | |
gcd.rs | 9 months ago | |
gcd.wat | 5 years ago | |
hello.c | 8 months ago | |
hello.rs | 9 months ago | |
hello.wat | 5 years ago | |
interrupt.c | 8 months ago | |
interrupt.rs | 9 months ago | |
interrupt.wat | 5 years ago | |
linking.c | 8 months ago | |
linking.rs | 9 months ago | |
linking1.wat | 5 years ago | |
linking2.wat | 5 years ago | |
memory.c | 8 months ago | |
memory.rs | 9 months ago | |
memory.wat | 5 years ago | |
mpk-available.rs | 9 months ago | |
mpk.rs | 9 months ago | |
multi.c | 8 months ago | |
multi.rs | 2 years ago | |
multi.wat | 5 years ago | |
multimemory.c | 8 months ago | |
multimemory.rs | 9 months ago | |
multimemory.wat | 3 years ago | |
serialize.c | 8 months ago | |
serialize.rs | 9 months ago | |
threads.c | 8 months ago | |
threads.rs | 9 months ago | |
threads.wat | 3 years ago |
README.md
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
. C examples can
be built with mkdir build && cd build && cmake ..
. You can run
cmake --build .
to build all examples or
cmake --build . --target wasmtime-$name
, replacing the name as you wish. They
can also be built manually.
For more information see the examples themselves!