NAME
Wasm::Wasmtime::Table - Wasmtime table class
VERSION
version 0.05
SYNOPSIS
use Wasm::Wasmtime;
my $instance = Wasm::Wasmtime::Instance->new(
Wasm::Wasmtime::Module->new(wat => q{
(module
(table (export "table") 1 funcref)
)
}),
);
my $table = $instance->get_export('table')->as_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.
as_extern
my $extern = $table->as_extern;
Returns the Wasm::Wasmtime::Extern for this table object.
SEE ALSO
AUTHOR
Graham Ollis <plicease@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2020 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.