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.
 
 
 
Chris Fallin 8a55b5c563 Add epoch-based interruption for cooperative async timeslicing. 3 years ago
..
fib-debug Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
tokio Change the injection count of fuel in a store from u32 to u64 (#3048) 3 years ago
wasi Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
README.md Move all examples to a top-level directory (#1286) 5 years ago
epochs.rs Add epoch-based interruption for cooperative async timeslicing. 3 years ago
externref.c Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
externref.rs Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
externref.wat wasmtime-c-api: Add an `externref`s example for the C API 4 years ago
fuel.c Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
fuel.rs Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
fuel.wat Add example of execution limits using fuel consumption (#2869) 4 years ago
gcd.c Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
gcd.rs Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
gcd.wat Move all examples to a top-level directory (#1286) 5 years ago
hello.c Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
hello.rs Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
hello.wat Move all examples to a top-level directory (#1286) 5 years ago
interrupt.c c-api: add wasmtime_trap_code (#3086) 3 years ago
interrupt.rs Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
interrupt.wat Implement interrupting wasm code, reimplement stack overflow (#1490) 5 years ago
linking.c Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
linking.rs Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 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 Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
memory.rs Implement the memory64 proposal in Wasmtime (#3153) 3 years ago
memory.wat Move all examples to a top-level directory (#1286) 5 years ago
multi.c Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
multi.rs Remove the old x86 backend 3 years ago
multi.wat Move all examples to a top-level directory (#1286) 5 years ago
multimemory.c Add multimemory example. 3 years ago
multimemory.rs Add multimemory example. 3 years ago
multimemory.wat Add multimemory example. 3 years ago
serialize.c Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
serialize.rs Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
threads.c Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 years ago
threads.rs Implement RFC 11: Redesigning Wasmtime's APIs (#2897) 3 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, and C examples need to be compiled using your system compiler and appropriate header files.

For more information see the examples themselves!