Back to Wasmtime

Working with Multiple Memories

docs/examples-multimemory.md

44.0.1831 B
Original Source

Working with Multiple Memories

You can also browse this source code online and clone the wasmtime repository to run the example locally:

This example demonstrates using the multiple memories proposal, instantiating a module that imports and exports more than one linear memory.

Wasm Source

wat
{{#include ../examples/multimemory.wat}}

Host Source

<!-- langtabs-start -->
rust
{{#include ../examples/multimemory.rs}}
c
{{#include ../examples/multimemory.c}}
cpp
{{#include ../examples/multimemory.cc}}
<!-- langtabs-end -->