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.
Bruce Mitchener
e2664e55a9
|
3 months ago | |
---|---|---|
.. | ||
component | 3 months ago | |
fib-debug | 5 months ago | |
min-platform | 5 months ago | |
tokio | 3 months ago | |
wasi | 3 months ago | |
wasi-async | 3 months ago | |
CMakeLists.txt | 3 months ago | |
README.md | 2 years ago | |
anyref.c | 7 months ago | |
anyref.rs | 3 months ago | |
anyref.wat | 7 months ago | |
async.cpp | 3 months ago | |
async.wat | 1 year ago | |
coredump.rs | 9 months ago | |
epochs.rs | 2 years ago | |
externref.c | 7 months ago | |
externref.rs | 3 months ago | |
externref.wat | 4 years ago | |
fuel.c | 8 months ago | |
fuel.rs | 3 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 | 6 months ago | |
multi.c | 8 months ago | |
multi.rs | 3 months 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!