Skip to content

Support WebAssembly Tables #13

@veewee

Description

@veewee

See:

$table = new Wasm\Table(minimum: 2, maximum: null, type: 'i32', init: $initValue);

$instance = Wasm\InstanceBuilder::fromWat($wat)
    ->withImports(['env' => ['someTable' => $table]])
    ->build();


$table = $instance->getTable();
$table->set(0, 1);
$table->get(0);
$table->count(); // implements \Countable
$table->grow(2, $initValue);

// possibly:
[...$table] // implements Iterator | IteratorAggregate

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions