1# Linking modules 2 3You can also browse this source code online and clone the wasmtime 4repository to run the example locally: 5 6* [Rust](https://github.com/bytecodealliance/wasmtime/blob/main/examples/linking.rs) 7* [C](https://github.com/bytecodealliance/wasmtime/blob/main/examples/linking.c) 8* [C++](https://github.com/bytecodealliance/wasmtime/blob/main/examples/linking.cc) 9 10This example shows off how to compile and instantiate modules which link 11together. Be sure to read the API documentation for [`Linker`] as well. 12 13[`Linker`]: https://docs.rs/wasmtime/0.26.0/wasmtime/struct.Linker.html 14 15## Wasm: `linking1.wat` 16 17```wat 18{{#include ../examples/linking1.wat}} 19``` 20 21## Wasm: `linking2.wat` 22 23```wat 24{{#include ../examples/linking2.wat}} 25``` 26 27## Host Source 28 29<!-- langtabs-start --> 30 31```rust 32{{#include ../examples/linking.rs}} 33``` 34 35```c 36{{#include ../examples/linking.c}} 37``` 38 39```cpp 40{{#include ../examples/linking.cc}} 41``` 42 43<!-- langtabs-end --> 44