class Wasmer::Memory

Overview

Memory is a vector of raw uninterpreted bytes. See Also Specification: https://webassembly.github.io/spec/core/syntax/modules.html#memories

Included Modules

Defined in:

wasmer/memory.cr

Constructors

Instance Method Summary

Instance methods inherited from module Wasmer::WithExtern

to_extern : Extern to_extern

Constructor Detail

def self.new(store : Store, type : MemoryType) #

[View source]

Instance Method Detail

def bytesize : UInt32 #

Returns memory size as a number of bytes


[View source]
def data : Bytes #

Returns memory contents as Bytes


[View source]
def grow(delta : Pages) : Bool #

Grows the Memory's size by a given number of Pages (the delta)


[View source]
def size : Pages #

Returns memory size as Pages


[View source]
def to_extern : Extern #

[View source]
def type : MemoryType #

Returns memory's MemoryType


[View source]
def view(offset : Int) #

Returns the view of memory starting from provided offset raises if offset is greater than memory byte size


[View source]