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.
 
 
 
Nick Fitzgerald ff93bce067
Wasmtime: Finish support for the typed function references proposal (#7943)
9 months ago
..
component examples: add component model example (#7759) 10 months ago
fib-debug add clang format (#7601) 11 months ago
tokio Make wasi-common self-contained, deprecate exports from wasmtime-wasi (#7881) 9 months ago
wasi Make wasi-common self-contained, deprecate exports from wasmtime-wasi (#7881) 9 months ago
wasi-async WASI: remove unnecessary Sync constraints (#7802) 10 months ago
CMakeLists.txt examples: add component model example (#7759) 10 months ago
README.md Add cmake compatibility to c-api (#4369) 2 years ago
async.cpp Switch to simpler fuel APIs (#7298) 1 year ago
async.wat Async support in the C API (#7106) 1 year ago
coredump.rs Add docs and example for debugging with core dumps (#7087) 1 year ago
epochs.rs Remove explicit `S` type parameters (#5275) 2 years ago
externref.c examples: Don't `fread()` within `assert(...)`. (#7803) 10 months ago
externref.rs Wasmtime: Finish support for the typed function references proposal (#7943) 9 months ago
externref.wat wasmtime-c-api: Add an `externref`s example for the C API 4 years ago
fuel.c add clang format (#7601) 11 months ago
fuel.rs Switch to simpler fuel APIs (#7298) 1 year ago
fuel.wat Bump wasm-tools crates (#7094) 1 year ago
gcd.c add clang format (#7601) 11 months ago
gcd.rs Remove explicit `S` type parameters (#5275) 2 years ago
gcd.wat Move all examples to a top-level directory (#1286) 5 years ago
hello.c examples: Don't `fread()` within `assert(...)`. (#7803) 10 months ago
hello.rs Remove explicit `S` type parameters (#5275) 2 years ago
hello.wat Move all examples to a top-level directory (#1286) 5 years ago
interrupt.c examples: Don't `fread()` within `assert(...)`. (#7803) 10 months ago
interrupt.rs Remove explicit `S` type parameters (#5275) 2 years ago
interrupt.wat Implement interrupting wasm code, reimplement stack overflow (#1490) 5 years ago
linking.c add clang format (#7601) 11 months ago
linking.rs Make wasi-common self-contained, deprecate exports from wasmtime-wasi (#7881) 9 months ago
linking1.wat Add examples of linking and WASI (#1369) 5 years ago
linking2.wat Add examples of linking and WASI (#1369) 5 years ago
memory.c add clang format (#7601) 11 months ago
memory.rs fixed typo in examples/memory.rs (#5576) 2 years ago
memory.wat Move all examples to a top-level directory (#1286) 5 years ago
mpk-available.rs mpk: enable MPK if available in CI (#7815) 9 months ago
mpk.rs mpk: add an example testing the memory limits (#7609) 11 months ago
multi.c add clang format (#7601) 11 months ago
multi.rs Remove explicit `S` type parameters (#5275) 2 years ago
multi.wat Move all examples to a top-level directory (#1286) 5 years ago
multimemory.c add clang format (#7601) 11 months ago
multimemory.rs Remove explicit `S` type parameters (#5275) 2 years ago
multimemory.wat Update the wasm-tools family of crates (#4165) 3 years ago
serialize.c examples: Don't `fread()` within `assert(...)`. (#7803) 10 months ago
serialize.rs Remove explicit `S` type parameters (#5275) 2 years ago
threads.c Increase stack size in `examples/threads.c` (#7651) 11 months ago
threads.rs Fix typo in examples/threads.rs (#7328) 1 year ago
threads.wat Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 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!