1*97e0b7dbSAlex Crichton# Multithreaded Embedding 2*97e0b7dbSAlex Crichton 3*97e0b7dbSAlex CrichtonYou can also browse this source code online and clone the wasmtime 4*97e0b7dbSAlex Crichtonrepository to run the example locally: 5*97e0b7dbSAlex Crichton 6*97e0b7dbSAlex Crichton* [Rust](https://github.com/bytecodealliance/wasmtime/blob/main/examples/threads.rs) 7*97e0b7dbSAlex Crichton* [C](https://github.com/bytecodealliance/wasmtime/blob/main/examples/threads.c) 8*97e0b7dbSAlex Crichton* [C++](https://github.com/bytecodealliance/wasmtime/blob/main/examples/threads.cc) 9*97e0b7dbSAlex Crichton 10*97e0b7dbSAlex CrichtonThis example demonstrates using Wasmtime in multithreaded runtimes. 11*97e0b7dbSAlex Crichton 12*97e0b7dbSAlex Crichton## Wasm Source 13*97e0b7dbSAlex Crichton 14*97e0b7dbSAlex Crichton```wat 15*97e0b7dbSAlex Crichton{{#include ../examples/threads.wat}} 16*97e0b7dbSAlex Crichton``` 17*97e0b7dbSAlex Crichton 18*97e0b7dbSAlex Crichton## Host Source 19*97e0b7dbSAlex Crichton 20*97e0b7dbSAlex Crichton<!-- langtabs-start --> 21*97e0b7dbSAlex Crichton 22*97e0b7dbSAlex Crichton```rust 23*97e0b7dbSAlex Crichton{{#include ../examples/threads.rs}} 24*97e0b7dbSAlex Crichton``` 25*97e0b7dbSAlex Crichton 26*97e0b7dbSAlex Crichton```c 27*97e0b7dbSAlex Crichton{{#include ../examples/threads.c}} 28*97e0b7dbSAlex Crichton``` 29*97e0b7dbSAlex Crichton 30*97e0b7dbSAlex Crichton```cpp 31*97e0b7dbSAlex Crichton{{#include ../examples/threads.cc}} 32*97e0b7dbSAlex Crichton``` 33*97e0b7dbSAlex Crichton 34*97e0b7dbSAlex Crichton<!-- langtabs-end --> 35