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.
 
 
 
Daniel Marin b86cba98a9
fixed typo in examples/memory.rs (#5576)
2 years ago
..
fib-debug Remove explicit `S` type parameters (#5275) 2 years ago
tokio Remove explicit `S` type parameters (#5275) 2 years ago
wasi Remove explicit `S` type parameters (#5275) 2 years ago
CMakeLists.txt Add cmake compatibility to c-api (#4369) 2 years ago
README.md Add cmake compatibility to c-api (#4369) 2 years ago
epochs.rs Remove explicit `S` type parameters (#5275) 2 years ago
externref.c Add cmake compatibility to c-api (#4369) 2 years ago
externref.rs Remove explicit `S` type parameters (#5275) 2 years ago
externref.wat wasmtime-c-api: Add an `externref`s example for the C API 4 years ago
fuel.c Fix `OutOfFuel` trap code not represented in the C API. (#5230) 2 years ago
fuel.rs Remove explicit `S` type parameters (#5275) 2 years ago
fuel.wat Add example of execution limits using fuel consumption (#2869) 4 years ago
gcd.c Add cmake compatibility to c-api (#4369) 2 years 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 Add cmake compatibility to c-api (#4369) 2 years 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 Add cmake compatibility to c-api (#4369) 2 years 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 cmake compatibility to c-api (#4369) 2 years ago
linking.rs Remove explicit `S` type parameters (#5275) 2 years 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 cmake compatibility to c-api (#4369) 2 years 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
multi.c Add cmake compatibility to c-api (#4369) 2 years 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 cmake compatibility to c-api (#4369) 2 years 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 Add cmake compatibility to c-api (#4369) 2 years ago
serialize.rs Remove explicit `S` type parameters (#5275) 2 years ago
threads.c Add cmake compatibility to c-api (#4369) 2 years ago
threads.rs Remove explicit `S` type parameters (#5275) 2 years 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!