WaEmbedder.Memory.Binary (WaEmbedderEx v0.1.0)

Copy Markdown View Source

Default linear-memory backend (Elixir-facing name), a thin shim over the Erlang :wa_embedder_memory_binary implementation. Retained so the WaEmbedder.Memory.Binary name and its direct API stay callable from Elixir (and so WaEmbedder.Memory.validate_backend!/1 sees all nine callbacks exported here).

The reference is the opaque %{mem: binary, max: max | :none} map produced by the Erlang backend; out-of-bounds access traps via :erlang.error({:wasm_trap, :memory_oob, %{addr: addr, width: width}}).

Summary

Functions

copy(ref, dst, src, n)

See :wa_embedder_memory_binary.copy/4.

fill(ref, dst, value, n)

See :wa_embedder_memory_binary.fill/4.

grow(ref, delta)

See :wa_embedder_memory_binary.grow/2.

init(ref, dst, payload, n)

See :wa_embedder_memory_binary.init/4.

load(ref, addr, width, decode)

See :wa_embedder_memory_binary.load/4.

new(min_pages, max_pages)

See :wa_embedder_memory_binary.new/2.

size(ref)

See :wa_embedder_memory_binary.size/1.

store(ref, addr, width, value, value_type)

See :wa_embedder_memory_binary.store/5.

write_data(ref, offset, payload)

See :wa_embedder_memory_binary.write_data/3.