View Source Orb.Memory (Orb v0.0.21)

Work with memory.

Summary

Functions

Initializes data in memory. In Wat is (data …)

Initializes data in memory from a packed Map. In Wat is (data …)

Load value of type from memory address.

Declare how many 64Kib pages of memory your module needs.

Store value of type at memory address.

Functions

Initializes data in memory. In Wat is (data …)

Link to this function

initial_data_prepacked(packed_map)

View Source

Initializes data in memory from a packed Map. In Wat is (data …)

Load value of type from memory address.

Memory.load!(I32, 0x100)
Memory.load!(I32.U8, 0x100)
Link to this macro

pages(min_count)

View Source (macro)

Declare how many 64Kib pages of memory your module needs.

Can be called multiple times: the highest value is used.

Link to this function

store!(type, address, value)

View Source

Store value of type at memory address.

Memory.store!(I32, 0x100, 42)
Memory.store!(I32.U8, 0x100, ?a)