bytecodealliance / bytecodealliance/wasmtime

Expose memory `needs_init` on `LinearMemory`/`RuntimeLinearMemory`

Open
#12,517 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
18.6k
Forks
1.8k
Avg merge
1d 19h
Merged PRs (30d)
121

Description

#### Feature

Need to have control over whether or not a linear memory is reinitialized when a module is instantiated.

#### Benefit

The use-case for this is to have persistent memory that does not get wiped out across runs.

#### Implementation

Expose a `needs_init` function on the `LinearMemory` trait. It can default to true, which will resort to the
current behavior of always reinitializing the memory when a module is instantiated.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.