Skip to content

Constructs for manipulating default memory #2

@Hawkbat

Description

@Hawkbat

There's three parts to this: defining the size of memory (min + optional max), exporting/importing memory, and the WASM operators for getting the size of memory and growing it.

WASM might be getting multiple memories in the future, so it would make sense to treat memory as a pseudo-data type. For now at most one memory can be declared, and it must be the default memory.

Proposed declaration syntax: import? export? default? memory([min], [max]?) [identifier]
grow_memory: memory.grow([identifier:memory], [value:int])
current_memory: memory.sizeof([identifier:memory])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions