Skip to main content

Module memory

Module memory 

Source
Expand description

Memory utilities for Wasm plugin development

§Platform

These functions are designed for WASM32 targets only. Pointer values are represented as i32, which is correct for WASM32’s 32-bit linear memory address space. Do not use on 64-bit native targets.

Enums§

DeserializeError
Error type for deserialization failures

Functions§

deserialize_from_ptr
Deserialize data from a raw pointer and length
pack_ptr_len
Pack a pointer and length into a single i64 value
plugin_alloc
Allocate memory in the Wasm linear memory
plugin_dealloc
Deallocate memory in the Wasm linear memory
serialize_and_return
Serialize data and return it as an allocated buffer