NAME
Wasm::Wasmtime::Config - Global configuration for Wasm::Wasmtime::Engine
VERSION
version 0.03
SYNOPSIS
use Wasm::Wasmtime;
my $config = Wasm::Wasmtime::Config->new;
$config->wasm_multi_value(1);
my $engine = Wasm::Wasmtime::Engine->new($config);
DESCRIPTION
WARNING: WebAssembly and Wasmtime are a moving target and the interface for these modules is under active development. Use with caution.
This class contains the configuration for Wasm::Wasmtime::Engine class. Each instance of the config class should only be used once.
CONSTRUCTOR
new
my $config = Wasm::Wasmtime::Config->new;
Create a new instance of the config class.
METHODS
debug_info
$config->debug_info($bool);
Configures whether DWARF debug information is emitted for the generated code. This can improve profiling and the debugging experience.
wasm_threads
$config->wasm_threads($bool);
Configures whether the wasm threads proposal is enabled
https://github.com/webassembly/threads
wasm_reference_types
$config->wasm_reference_types($bool);
Configures whether the wasm reference types proposal is enabled.
https://github.com/webassembly/reference-types
wasm_simd
$config->wasm_simd($bool);
Configures whether the wasm SIMD proposal is enabled.
https://github.com/webassembly/simd
wasm_bulk_memory
$config->wasm_bulk_memory($bool);
Configures whether the wasm bulk memory proposal is enabled.
https://github.com/webassembly/bulk-memory
wasm_multi_value
Configures whether the wasm multi value proposal is enabled.
https://github.com/webassembly/multi-value
strategy
$config->strategy($strategy);
Configures the compilation strategy used for wasm code.
Will throw an exception if the selected strategy is not supported on your platform.
Acceptable values for $strategy
are:
auto
cranelift
lightbeam
cranelift_opt_level
$config->cranelift_opt_level($level);
Configure the cranelift optimization level:
Acceptable values for $level
are:
none
speed
speed_and_size
profiler
$config->profiler($profiler);
Configure the profiler.
Will throw an exception if the selected profiler is not supported on your platform.
Acceptable values for $profiler
are:
none
jitdump
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.