Wasmer PHP

Config

Table of Contents

COMPILER_CRANELIFT  = WASM_COMPILER_CRANELIFT
COMPILER_LLVM  = WASM_COMPILER_LLVM
COMPILER_SINGLEPASS  = WASM_COMPILER_SINGLEPASS
ENGINE_JIT  = WASM_ENGINE_JIT
ENGINE_NATIVE  = WASM_ENGINE_NATIVE
ENGINE_OBJECT_FILE  = WASM_ENGINE_OBJECT_FILE
__construct()  : mixed
Create a Wasm\Config from a `wasm_config_t` resource.
inner()  : resource
Return the inner config resource.
new()  : self
setCompiler()  : bool
Set the compiler for the current configuration.
setEngine()  : bool
Set the engine for the current configuration.

Constants

COMPILER_CRANELIFT

public mixed COMPILER_CRANELIFT = WASM_COMPILER_CRANELIFT

COMPILER_LLVM

public mixed COMPILER_LLVM = WASM_COMPILER_LLVM

COMPILER_SINGLEPASS

public mixed COMPILER_SINGLEPASS = WASM_COMPILER_SINGLEPASS

ENGINE_JIT

public mixed ENGINE_JIT = WASM_ENGINE_JIT

ENGINE_NATIVE

public mixed ENGINE_NATIVE = WASM_ENGINE_NATIVE

ENGINE_OBJECT_FILE

public mixed ENGINE_OBJECT_FILE = WASM_ENGINE_OBJECT_FILE

Methods

__construct()

Create a Wasm\Config from a `wasm_config_t` resource.

public __construct([ $config = null ]) : mixed
Parameters
$config : = null

?resource a wasm_config_t resource

Tags
throws
InvalidArgumentException

If the $config argument is not a valid wasm_config_t resource

Return values
mixed

inner()

Return the inner config resource.

public inner() : resource
Return values
resource

A wasm_config_t resource

new()

public static new([int|null $compiler = null ][, int|null $engine = null ]) : self
Parameters
$compiler : int|null = null
$engine : int|null = null
Tags
throws
InvalidArgumentException

If the $compiler or $engine arguments are not valid, respectively,compilers and engines.

Return values
self

setCompiler()

Set the compiler for the current configuration.

public setCompiler(int $compiler) : bool
Parameters
$compiler : int
Tags
throws
InvalidArgumentException

If the $compiler is not a valid compiler

Return values
bool

setEngine()

Set the engine for the current configuration.

public setEngine(int $engine) : bool
Parameters
$engine : int
Tags
throws
InvalidArgumentException

If the $engine is not a valid compiler

Return values
bool

Search results