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