1# Using linear memory
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/memory.rs)
7* [C](https://github.com/bytecodealliance/wasmtime/blob/main/examples/memory.c)
8* [C++](https://github.com/bytecodealliance/wasmtime/blob/main/examples/memory.cc)
9
10This example shows off how to interact with wasm memory in a module. Be sure to
11read the documentation for [`Memory`] as well.
12
13[`Memory`]: https://bytecodealliance.github.io/wasmtime/api/wasmtime/struct.Memory.html
14
15## Wasm Source
16
17```wat
18{{#include ../examples/memory.wat}}
19```
20
21## Host Source
22
23<!-- langtabs-start -->
24
25```rust
26{{#include ../examples/memory.rs}}
27```
28
29```c
30{{#include ../examples/memory.c}}
31```
32
33```cpp
34{{#include ../examples/memory.cc}}
35```
36
37<!-- langtabs-end -->
38