🌻 📖 Wasm::Wasmtime::Table

NAME

Wasm::Wasmtime::Table - Wasmtime table class

VERSION

version 0.23

SYNOPSIS

 use Wasm::Wasmtime;
 
 my $store = Wasm::Wasmtime::Store->new;
 my $instance = Wasm::Wasmtime::Instance->new(
   Wasm::Wasmtime::Module->new($store->engine, wat => q{
     (module
       (table (export "table") 1 funcref)
     )
   }),
   $store,
 );
 
 my $table = $instance->exports->table;
 print $table->type->element->kind, "\n";   # funcref
 print $table->size, "\n";                  # 1

DESCRIPTION

WARNING: WebAssembly and Wasmtime are a moving target and the interface for these modules is under active development. Use with caution.

This class represents a WebAssembly table object.

METHODS

type

 my $tabletype = $table->type;

Returns the Wasm::Wasmtime::TableType object for this table object.

size

 my $size = $table->size;

Returns the size of the table.

SEE ALSO

Wasm
Wasm::Wasmtime

AUTHOR

Graham Ollis <plicease@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2020-2022 by Graham Ollis.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.