API Documentation
Namespaces
Table of Contents
- wasm_config_new() : resource
- Create a new default Wasmer configuration.
- wasm_config_delete() : bool
- Delete a config object.
- wasm_config_set_compiler() : bool
- Update the configuration to specify a particular compiler to use.
- wasm_config_set_engine() : bool
- Update the configuration to specify a particular engine to use.
- wasm_engine_new() : resource
- Create a new JIT engine with the default compiler.
- wasm_engine_new_with_config() : resource
- Create an engine with a particular configuration.
- wasm_engine_delete() : bool
- Delete an engine.
- wasm_store_new() : resource
- Create a new WebAssembly store given a specific engine.
- wasm_store_delete() : bool
- Delete a store.
- wasm_valtype_new() : resource
- Create a new valtype.
- wasm_valtype_delete() : bool
- Delete a valtype.
- wasm_valtype_kind() : int
- Return the valtype kind.
- wasm_valtype_is_num() : bool
- Return `true` if the given valtype has a numeric kind.
- wasm_valtype_is_ref() : bool
- Return `true` if the given valtype has a reference kind.
- wasm_valtype_copy() : resource
- Create a copy of the given valtype.
- wasm_valkind_is_num() : bool
- Verify whether the given kind is numeric.
- wasm_valkind_is_ref() : bool
- Verify whether the given kind is a reference.
- wasm_functype_new() : resource
- Create a new valtype.
- wasm_functype_delete() : bool
- Delete a functype.
- wasm_functype_params() : ValType
- wasm_functype_results() : ValType
- wasm_functype_copy() : resource
- wasm_functype_as_externtype() : resource
- wasm_globaltype_new() : resource
- wasm_globaltype_delete() : bool
- Delete a globaltype.
- wasm_globaltype_content() : resource
- wasm_globaltype_mutability() : int
- wasm_globaltype_copy() : resource
- wasm_globaltype_as_externtype() : resource
- wasm_limits_new() : resource
- Create a new limits.
- wasm_limits_min() : int
- wasm_limits_max() : int
- wasm_tabletype_new() : resource
- wasm_tabletype_delete() : bool
- Delete a tabletype.
- wasm_tabletype_element() : resource
- wasm_tabletype_limits() : resource
- wasm_tabletype_copy() : resource
- wasm_tabletype_as_externtype() : resource
- wasm_memorytype_new() : resource
- Create a new memorytype.
- wasm_memorytype_delete() : bool
- Delete a memorytype.
- wasm_memorytype_limits() : resource
- wasm_memorytype_copy() : resource
- wasm_memorytype_as_externtype() : resource
- wasm_externtype_delete() : bool
- wasm_externtype_kind() : int
- wasm_externtype_as_functype() : resource
- wasm_externtype_as_globaltype() : resource
- wasm_externtype_as_tabletype() : resource
- wasm_externtype_as_memorytype() : resource
- wasm_importtype_new() : resource
- wasm_importtype_delete() : bool
- Delete a importtype.
- wasm_importtype_module() : string
- wasm_importtype_name() : string
- wasm_importtype_type() : resource
- wasm_importtype_copy() : resource
- wasm_exporttype_new() : resource
- wasm_exporttype_delete() : bool
- Delete a exporttype.
- wasm_exporttype_name() : string
- wasm_exporttype_type() : resource
- wasm_exporttype_copy() : resource
- wasm_val_delete() : bool
- Delete a val.
- wasm_val_value() : mixed
- wasm_val_kind() : int
- wasm_val_copy() : resource
- wasm_val_i32() : resource
- wasm_val_i64() : resource
- wasm_val_f32() : resource
- wasm_val_f64() : resource
- wasm_frame_copy() : resource
- wasm_frame_instance() : resource
- wasm_frame_func_index() : int
- wasm_frame_func_offset() : int
- wasm_frame_module_offset() : int
- wasm_trap_new() : resource
- wasm_trap_delete() : bool
- wasm_trap_copy() : resource
- wasm_trap_message() : string
- wasm_trap_origin() : resource
- wasm_trap_trace() : Frame
- wasm_module_new() : resource
- wasm_module_delete() : bool
- Delete a module.
- wasm_module_validate() : bool
- wasm_module_imports() : ImportType
- wasm_module_exports() : ExportType
- wasm_module_serialize() : string
- wasm_module_deserialize() : resource
- wasm_module_name() : string
- wasm_module_set_name() : bool
- wasm_module_copy() : resource
- wasm_func_new() : resource
- wasm_func_delete() : bool
- Delete a func.
- wasm_func_type() : resource
- wasm_func_param_arity() : int
- wasm_func_result_arity() : int
- wasm_func_call() : Val
- wasm_func_as_extern() : resource
- wasm_global_new() : resource
- wasm_global_delete() : bool
- Delete a global.
- wasm_global_type() : resource
- wasm_global_get() : resource
- wasm_global_set() : void
- wasm_global_copy() : resource
- wasm_global_same() : bool
- wasm_global_as_extern() : resource
- wasm_extern_delete() : bool
- Delete an extern.
- wasm_extern_kind() : int
- wasm_extern_type() : resource
- wasm_extern_as_func() : resource
- wasm_extern_as_global() : resource
- wasm_extern_as_table() : resource
- wasm_extern_as_memory() : resource
- wasm_instance_new() : resource
- wasm_instance_delete() : bool
- Delete an instance.
- wasm_instance_exports() : Extern
- wasm_instance_copy() : resource
- wasmer_version() : string
- Return the version of the Wasmer C API.
- wasmer_version_major() : int
- Return the major version of the Wasmer C API.
- wasmer_version_minor() : int
- Return the minor version of the Wasmer C API.
- wasmer_version_patch() : int
- Return the patch version of the Wasmer C API.
- wasmer_version_pre() : string
- Return the pre-release label of the Wasmer C API.
- wat2wasm() : string
- ⚠️ This is a Wasmer-specific function.
Functions
wasm_config_new()
Create a new default Wasmer configuration.
wasm_config_new() : resource
<?php
// Create the configuration.
$config = wasm_config_new();
// Create the engine using the configuration.
$engine = wasm_engine_new_with_config($config);
// Free everything.
wasm_engine_delete($engine);
Tags
wasm_config_delete()
Delete a config object.
wasm_config_delete(resource $config) : bool
<?php
// Create the configuration.
$config = wasm_config_new();
// Delete the configuration
wasm_config_delete($config);
ℹ️ This function does not need to be called if the configuration was used as an argument of
wasm_engine_new_with_config
.
Parameters
- $config : resource
-
A
wasm_config_t
resource
wasm_config_set_compiler()
Update the configuration to specify a particular compiler to use.
wasm_config_set_compiler(resource $config, int $compiler) : bool
<?php
// Create the configuration.
$config = wasm_config_new();
// Use the Cranelift compiler.
wasm_config_set_compiler($config, WASM_COMPILER_CRANELIFT);
// Create the engine.
$engine = wasm_engine_new_with_config($config);
// Free everything.
wasm_engine_delete($engine);
⚠️ This is a Wasmer-specific function.
Parameters
- $config : resource
-
A
wasm_config_t
resource - $compiler : int
wasm_config_set_engine()
Update the configuration to specify a particular engine to use.
wasm_config_set_engine(resource $config, int $engine) : bool
<?php
// Create the configuration.
$config = wasm_config_new();
// Use the JIT engine.
wasm_config_set_compiler($config, WASM_ENGINE_JIT);
// Create the engine.
$engine = wasm_engine_new_with_config($config);
// Free everything.
wasm_engine_delete($engine);
⚠️ This is a Wasmer-specific function.
Parameters
- $config : resource
-
A
wasm_config_t
resource - $engine : int
wasm_engine_new()
Create a new JIT engine with the default compiler.
wasm_engine_new() : resource
Tags
wasm_engine_new_with_config()
Create an engine with a particular configuration.
wasm_engine_new_with_config(resource $config) : resource
Parameters
- $config : resource
-
A
wasm_config_t
resource
Tags
wasm_engine_delete()
Delete an engine.
wasm_engine_delete(resource $engine) : bool
<?php
// Create a default engine.
$engine = wasm_engine_new();
// Free everything.
wasm_engine_delete($engine);
Parameters
- $engine : resource
-
A
wasm_engine_t
resource
wasm_store_new()
Create a new WebAssembly store given a specific engine.
wasm_store_new(resource $engine) : resource
<?php
// Create a default engine.
$engine = wasm_engine_new();
// Create a store.
$store = wasm_store_new($store);
// Free everything.
wasm_store_delete($store);
wasm_engine_delete($engine);
Parameters
- $engine : resource
-
A
wasm_engine_t
resource
wasm_store_delete()
Delete a store.
wasm_store_delete(resource $store) : bool
Parameters
- $store : resource
-
A
wasm_store_t
resource
Tags
wasm_valtype_new()
Create a new valtype.
wasm_valtype_new(int $kind) : resource
<?php
// Create a valtype of kind i32
$valtype = wasm_valtype_new(WASM_I32);
// Free everything.
wasm_valtype_delete($valtype);
Parameters
- $kind : int
-
The kind of valuetype. This must be one of
WASM_I32
,WASM_F32
,WASM_I64
,WASM_F64
,WASM_ANYREF
orWASM_FUNCREF
.
wasm_valtype_delete()
Delete a valtype.
wasm_valtype_delete(resource $valtype) : bool
Parameters
- $valtype : resource
-
a
wasm_valtype_t
resourceℹ️ This function does not need to be called if the configuration was used as an argument of
wasm_functype_new
,wasm_globaltype_new
,wasm_tabletype_new
or was added to a\Wasm\Vec\Val
Tags
wasm_valtype_kind()
Return the valtype kind.
wasm_valtype_kind(resource $valtype) : int
<?php
// Create a valtype of kind i32
$valtype = wasm_valtype_new(WASM_I32);
var_dump(wasm_valtype_kind($valtype) === WASM_I32); // bool(true)
// Free everything.
wasm_valtype_delete($valtype);
Parameters
- $valtype : resource
-
A
wasm_valtype_t
resource
wasm_valtype_is_num()
Return `true` if the given valtype has a numeric kind.
wasm_valtype_is_num(resource $valtype) : bool
<?php
// Create some valtypes
$i32 = wasm_valtype_new(WASM_I32);
$ref = wasm_valtype_new(WASM_ANYREF);
var_dump(wasm_valtype_is_num($i32)); // bool(true)
var_dump(wasm_valtype_is_num($ref)); // bool(false)
// Free everything.
wasm_valtype_delete($i32);
wasm_valtype_delete($ref);
Parameters
- $valtype : resource
-
A
wasm_valtype_t
resource
wasm_valtype_is_ref()
Return `true` if the given valtype has a reference kind.
wasm_valtype_is_ref(resource $valtype) : bool
<?php
// Create some valtypes
$i32 = wasm_valtype_new(WASM_I32);
$ref = wasm_valtype_new(WASM_ANYREF);
var_dump(wasm_valtype_is_ref($i32)); // bool(false)
var_dump(wasm_valtype_is_ref($ref)); // bool(true)
// Free everything.
wasm_valtype_delete($i32);
wasm_valtype_delete($ref);
Parameters
- $valtype : resource
-
A
wasm_valtype_t
resource
wasm_valtype_copy()
Create a copy of the given valtype.
wasm_valtype_copy(resource $valtype) : resource
<?php
// Create a valtype of kind i32
$valtype = wasm_valtype_new(WASM_I32);
$copy = wasm_valtype_copy($valtype);
// Free everything
wasm_valtype_delete($copy);
wasm_valtype_delete($valtype);
Parameters
- $valtype : resource
-
The
wasm_valtype_t
resource to copy
wasm_valkind_is_num()
Verify whether the given kind is numeric.
wasm_valkind_is_num(int $kind) : bool
<?php
var_dump(wasm_valkind_is_num(WASM_I32)); // bool(true)
var_dump(wasm_valkind_is_num(WASM_ANYREF)); // bool(false)
Parameters
- $kind : int
-
The kind of valuetype. This must be one of
WASM_I32
,WASM_F32
,WASM_I64
,WASM_F64
,WASM_ANYREF
orWASM_FUNCREF
.
wasm_valkind_is_ref()
Verify whether the given kind is a reference.
wasm_valkind_is_ref(int $kind) : bool
<?php
var_dump(wasm_valkind_is_ref(WASM_ANYREF)); // bool(true)
var_dump(wasm_valkind_is_ref(WASM_I32)); // bool(false)
Parameters
- $kind : int
-
The kind of valuetype. This must be one of
WASM_I32
,WASM_F32
,WASM_I64
,WASM_F64
,WASM_ANYREF
orWASM_FUNCREF
.
wasm_functype_new()
Create a new valtype.
wasm_functype_new(ValType $params, ValType $results) : resource
<?php
use Wasm\Vec\ValType;
// Create a valtype of kind i32
$functype = wasm_functype_new(new ValType(), new ValType());
// Free everything.
wasm_functype_delete($functype);
Parameters
wasm_functype_delete()
Delete a functype.
wasm_functype_delete(resource $functype) : bool
Parameters
- $functype : resource
-
A
wasm_functype_t
resource
Tags
wasm_functype_params()
wasm_functype_params(resource $functype) : ValType
Parameters
- $functype : resource
-
A
wasm_functype_t
resource
wasm_functype_results()
wasm_functype_results(resource $functype) : ValType
Parameters
- $functype : resource
-
A
wasm_functype_t
resource
wasm_functype_copy()
wasm_functype_copy(resource $functype) : resource
Parameters
- $functype : resource
-
A
wasm_functype_t
resource
wasm_functype_as_externtype()
wasm_functype_as_externtype(resource $functype) : resource
Parameters
- $functype : resource
-
A
wasm_functype_t
resource
wasm_globaltype_new()
wasm_globaltype_new(resource $valtype, int $mutability) : resource
Parameters
- $valtype : resource
-
A
wasm_valtype_t
resource - $mutability : int
wasm_globaltype_delete()
Delete a globaltype.
wasm_globaltype_delete(resource $globaltype) : bool
Parameters
- $globaltype : resource
-
A
wasm_globaltype_t
resource
Tags
wasm_globaltype_content()
wasm_globaltype_content(resource $globaltype) : resource
Parameters
- $globaltype : resource
wasm_globaltype_mutability()
wasm_globaltype_mutability(resource $globaltype) : int
Parameters
- $globaltype : resource
-
A
wasm_globaltype_t
resource
wasm_globaltype_copy()
wasm_globaltype_copy(resource $globaltype) : resource
Parameters
- $globaltype : resource
-
A
wasm_globaltype_t
resource
wasm_globaltype_as_externtype()
wasm_globaltype_as_externtype(resource $globaltype) : resource
Parameters
- $globaltype : resource
-
A
wasm_globaltype_t
resource
wasm_limits_new()
Create a new limits.
wasm_limits_new(int $min, int $max) : resource
Parameters
- $min : int
- $max : int
Tags
wasm_limits_min()
wasm_limits_min(resource $limits) : int
Parameters
- $limits : resource
-
A
wasm_limits_t
resource
wasm_limits_max()
wasm_limits_max(resource $limits) : int
Parameters
- $limits : resource
-
A
wasm_limits_t
resource
wasm_tabletype_new()
wasm_tabletype_new(resource $valtype, resource $limits) : resource
Parameters
- $valtype : resource
-
A
wasm_valtype_t
resource - $limits : resource
-
A
wasm_limits_t
resource
wasm_tabletype_delete()
Delete a tabletype.
wasm_tabletype_delete(resource $tabletype) : bool
Parameters
- $tabletype : resource
-
A
wasm_tabletype_t
resource
Tags
wasm_tabletype_element()
wasm_tabletype_element(resource $tabletype) : resource
Parameters
- $tabletype : resource
-
A
wasm_tabletype_t
resource
wasm_tabletype_limits()
wasm_tabletype_limits(resource $tabletype) : resource
Parameters
- $tabletype : resource
-
A
wasm_tabletype_t
resource
wasm_tabletype_copy()
wasm_tabletype_copy(resource $tabletype) : resource
Parameters
- $tabletype : resource
-
A
wasm_tabletype_t
resource
wasm_tabletype_as_externtype()
wasm_tabletype_as_externtype(resource $tabletype) : resource
Parameters
- $tabletype : resource
-
A
wasm_tabletype_t
resource
wasm_memorytype_new()
Create a new memorytype.
wasm_memorytype_new(resource $limits) : resource
<?php
$limits = wasm_limits_new(1, 2);
$memorytype = wasm_memorytype_new($limits);
// Free everything
wasm_memorytype_delete($memorytype);
Parameters
- $limits : resource
-
A
wasm_limits_t
resource
wasm_memorytype_delete()
Delete a memorytype.
wasm_memorytype_delete(resource $memorytype) : bool
Parameters
- $memorytype : resource
-
A
wasm_memorytype_t
resource
Tags
wasm_memorytype_limits()
wasm_memorytype_limits(resource $memorytype) : resource
Parameters
- $memorytype : resource
-
A
wasm_memorytype_t
resource
wasm_memorytype_copy()
wasm_memorytype_copy(resource $memorytype) : resource
Parameters
- $memorytype : resource
-
A
wasm_memorytype_t
resource
wasm_memorytype_as_externtype()
wasm_memorytype_as_externtype(resource $memorytype) : resource
Parameters
- $memorytype : resource
-
A
wasm_memorytype_t
resource
wasm_externtype_delete()
wasm_externtype_delete(resource $externtype) : bool
Parameters
- $externtype : resource
-
A
wasm_externtype_t
resource
wasm_externtype_kind()
wasm_externtype_kind(resource $externtype) : int
Parameters
- $externtype : resource
-
A
wasm_externtype_t
resource
wasm_externtype_as_functype()
wasm_externtype_as_functype(resource $externtype) : resource
Parameters
- $externtype : resource
-
A
wasm_externtype_t
resource
Tags
wasm_externtype_as_globaltype()
wasm_externtype_as_globaltype(resource $externtype) : resource
Parameters
- $externtype : resource
-
A
wasm_externtype_t
resource
Tags
wasm_externtype_as_tabletype()
wasm_externtype_as_tabletype(resource $externtype) : resource
Parameters
- $externtype : resource
-
A
wasm_externtype_t
resource
Tags
wasm_externtype_as_memorytype()
wasm_externtype_as_memorytype(resource $externtype) : resource
Parameters
- $externtype : resource
-
A
wasm_externtype_t
resource
Tags
wasm_importtype_new()
wasm_importtype_new(string $module, string $name, resource $externtype) : resource
Parameters
- $module : string
- $name : string
- $externtype : resource
-
A
wasm_externtype_t
resource
wasm_importtype_delete()
Delete a importtype.
wasm_importtype_delete(resource $importtype) : bool
Parameters
- $importtype : resource
-
A
wasm_importtype_t
resource
Tags
wasm_importtype_module()
wasm_importtype_module(resource $importtype) : string
Parameters
- $importtype : resource
-
A
wasm_importtype_t
resource
wasm_importtype_name()
wasm_importtype_name(resource $importtype) : string
Parameters
- $importtype : resource
-
A
wasm_importtype_t
resource
wasm_importtype_type()
wasm_importtype_type(resource $importtype) : resource
Parameters
- $importtype : resource
-
A
wasm_importtype_t
resource
wasm_importtype_copy()
wasm_importtype_copy(resource $importtype) : resource
Parameters
- $importtype : resource
-
A
wasm_importtype_t
resource
wasm_exporttype_new()
wasm_exporttype_new(string $name, resource $externtype) : resource
Parameters
- $name : string
- $externtype : resource
-
A
wasm_externtype_t
resource
wasm_exporttype_delete()
Delete a exporttype.
wasm_exporttype_delete(resource $exporttype) : bool
Parameters
- $exporttype : resource
-
A
wasm_exporttype_t
resource
Tags
wasm_exporttype_name()
wasm_exporttype_name(resource $exporttype) : string
Parameters
- $exporttype : resource
-
A
wasm_exporttype_t
resource
wasm_exporttype_type()
wasm_exporttype_type(resource $exporttype) : resource
Parameters
- $exporttype : resource
-
A
wasm_exporttype_t
resource
wasm_exporttype_copy()
wasm_exporttype_copy(resource $exporttype) : resource
Parameters
- $exporttype : resource
-
A
wasm_exporttype_t
resource
wasm_val_delete()
Delete a val.
wasm_val_delete(resource $val) : bool
Parameters
- $val : resource
-
A
wasm_eval_t
resource
wasm_val_value()
wasm_val_value(resource $val) : mixed
Parameters
- $val : resource
-
A
wasm_eval_t
resource
wasm_val_kind()
wasm_val_kind(resource $val) : int
Parameters
- $val : resource
-
A
wasm_eval_t
resource
wasm_val_copy()
wasm_val_copy(resource $val) : resource
Parameters
- $val : resource
-
A
wasm_eval_t
resource
wasm_val_i32()
wasm_val_i32(int $val) : resource
Parameters
- $val : int
wasm_val_i64()
wasm_val_i64(int $val) : resource
Parameters
- $val : int
wasm_val_f32()
wasm_val_f32(float $val) : resource
Parameters
- $val : float
wasm_val_f64()
wasm_val_f64(float $val) : resource
Parameters
- $val : float
wasm_frame_copy()
wasm_frame_copy(resource $frame) : resource
Parameters
- $frame : resource
-
A
wasm_frame_t
resource
wasm_frame_instance()
wasm_frame_instance(resource $frame) : resource
Parameters
- $frame : resource
-
A
wasm_frame_t
resource
wasm_frame_func_index()
wasm_frame_func_index(resource $frame) : int
Parameters
- $frame : resource
-
A
wasm_frame_t
resource
wasm_frame_func_offset()
wasm_frame_func_offset(resource $frame) : int
Parameters
- $frame : resource
-
A
wasm_frame_t
resource
wasm_frame_module_offset()
wasm_frame_module_offset(resource $frame) : int
Parameters
- $frame : resource
-
A
wasm_frame_t
resource
wasm_trap_new()
wasm_trap_new(resource $store, string $message) : resource
Parameters
- $store : resource
-
A
wasm_store_t
resource - $message : string
Tags
wasm_trap_delete()
wasm_trap_delete(resource $trap) : bool
Parameters
- $trap : resource
-
A
wasm_trap_t
resource
wasm_trap_copy()
wasm_trap_copy(resource $trap) : resource
Parameters
- $trap : resource
-
A
wasm_trap_t
resource
wasm_trap_message()
wasm_trap_message(resource $trap) : string
Parameters
- $trap : resource
-
A
wasm_trap_t
resource
wasm_trap_origin()
wasm_trap_origin(resource $trap) : resource
Parameters
- $trap : resource
-
A
wasm_trap_t
resource
wasm_trap_trace()
wasm_trap_trace(resource $trap) : Frame
Parameters
- $trap : resource
-
A
wasm_trap_t
resource
wasm_module_new()
wasm_module_new(resource $store, string $wasm) : resource
Parameters
- $store : resource
-
A
wasm_store_t
resource - $wasm : string
Tags
wasm_module_delete()
Delete a module.
wasm_module_delete(resource $module) : bool
Parameters
- $module : resource
-
A
wasm_module_t
resource
Tags
wasm_module_validate()
wasm_module_validate(resource $store, string $wasm) : bool
Parameters
- $store : resource
-
A
wasm_store_t
resource - $wasm : string
Tags
wasm_module_imports()
wasm_module_imports(resource $module) : ImportType
Parameters
- $module : resource
-
A
wasm_module_t
resource
wasm_module_exports()
wasm_module_exports(resource $module) : ExportType
Parameters
- $module : resource
-
A
wasm_module_t
resource
wasm_module_serialize()
wasm_module_serialize(resource $module) : string
Parameters
- $module : resource
-
A
wasm_module_t
resource
wasm_module_deserialize()
wasm_module_deserialize(resource $store, string $wasm) : resource
Parameters
- $store : resource
-
A
wasm_store_t
resource - $wasm : string
Tags
wasm_module_name()
wasm_module_name(resource $module) : string
Parameters
- $module : resource
-
A
wasm_module_t
resource
wasm_module_set_name()
wasm_module_set_name(resource $module, string $name) : bool
Parameters
- $module : resource
-
A
wasm_module_t
resource - $name : string
wasm_module_copy()
wasm_module_copy(resource $module) : resource
Parameters
- $module : resource
-
A
wasm_module_t
resource
wasm_func_new()
wasm_func_new(resource $store, resource $functype, callable $func) : resource
Parameters
- $store : resource
-
A
wasm_store_t
resource - $functype : resource
-
A
wasm_functype_t
resource - $func : callable
wasm_func_delete()
Delete a func.
wasm_func_delete(resource $func) : bool
Parameters
- $func : resource
-
A
wasm_func_t
resource
Tags
wasm_func_type()
wasm_func_type(resource $func) : resource
Parameters
- $func : resource
-
A
wasm_func_t
resource
wasm_func_param_arity()
wasm_func_param_arity(resource $func) : int
Parameters
- $func : resource
-
A
wasm_func_t
resource
wasm_func_result_arity()
wasm_func_result_arity(resource $func) : int
Parameters
- $func : resource
-
A
wasm_func_t
resource
wasm_func_call()
wasm_func_call(resource $func, Val $args) : Val
Parameters
- $func : resource
-
A
wasm_func_t
resource - $args : Val
wasm_func_as_extern()
wasm_func_as_extern(resource $func) : resource
Parameters
- $func : resource
-
A
wasm_func_t
resource
wasm_global_new()
wasm_global_new(resource $store, resource $globaltype, resource $val) : resource
Parameters
- $store : resource
-
A
wasm_store_t
resource - $globaltype : resource
-
A
wasm_globaltype_t
resource - $val : resource
-
A
wasm_val_t
resource
wasm_global_delete()
Delete a global.
wasm_global_delete(resource $global) : bool
Parameters
- $global : resource
-
A
wasm_global_t
resource
Tags
wasm_global_type()
wasm_global_type(resource $global) : resource
Parameters
- $global : resource
-
A
wasm_global_t
resource
wasm_global_get()
wasm_global_get(resource $global) : resource
Parameters
- $global : resource
-
A
wasm_global_t
resource
wasm_global_set()
wasm_global_set(resource $global, resource $val) : void
Parameters
- $global : resource
-
A
wasm_global_t
resource - $val : resource
-
A
wasm_val_t
resource
wasm_global_copy()
wasm_global_copy(resource $global) : resource
Parameters
- $global : resource
-
A
wasm_global_t
resource
wasm_global_same()
wasm_global_same(resource $left, resource $right) : bool
Parameters
- $left : resource
-
A
wasm_global_t
resource - $right : resource
-
A
wasm_global_t
resource
wasm_global_as_extern()
wasm_global_as_extern(resource $global) : resource
Parameters
- $global : resource
-
A
wasm_global_t
resource
wasm_extern_delete()
Delete an extern.
wasm_extern_delete(resource $extern) : bool
Parameters
- $extern : resource
-
A
wasm_extern_t
resource
wasm_extern_kind()
wasm_extern_kind(resource $extern) : int
Parameters
- $extern : resource
-
A
wasm_extern_t
resource
wasm_extern_type()
wasm_extern_type(resource $extern) : resource
Parameters
- $extern : resource
-
A
wasm_extern_t
resource
wasm_extern_as_func()
wasm_extern_as_func(resource $extern) : resource
Parameters
- $extern : resource
-
A
wasm_extern_t
resource
Tags
wasm_extern_as_global()
wasm_extern_as_global(resource $extern) : resource
Parameters
- $extern : resource
-
A
wasm_extern_t
resource
Tags
wasm_extern_as_table()
wasm_extern_as_table(resource $extern) : resource
Parameters
- $extern : resource
-
A
wasm_extern_t
resource
Tags
wasm_extern_as_memory()
wasm_extern_as_memory(resource $extern) : resource
Parameters
- $extern : resource
-
A
wasm_extern_t
resource
Tags
wasm_instance_new()
wasm_instance_new(resource $store, resource $module, Extern $externs) : resource
Parameters
- $store : resource
-
A
wasm_store_t
resource - $module : resource
-
A
wasm_module_t
resource - $externs : Extern
wasm_instance_delete()
Delete an instance.
wasm_instance_delete(resource $instance) : bool
Parameters
- $instance : resource
-
A
wasm_instance_t
resource
Tags
wasm_instance_exports()
wasm_instance_exports(resource $instance) : Extern
Parameters
- $instance : resource
-
A
wasm_instance_t
resource
wasm_instance_copy()
wasm_instance_copy(resource $instance) : resource
Parameters
- $instance : resource
-
A
wasm_instance_t
resource
wasmer_version()
Return the version of the Wasmer C API.
wasmer_version() : string
Example
<?php
$version = wasmer_version();
⚠️ This is a Wasmer-specific function.
wasmer_version_major()
Return the major version of the Wasmer C API.
wasmer_version_major() : int
Example
<?php
$major = wasmer_version_major();
⚠️ This is a Wasmer-specific function.
wasmer_version_minor()
Return the minor version of the Wasmer C API.
wasmer_version_minor() : int
Example
<?php
$minor = wasmer_version_minor();
⚠️ This is a Wasmer-specific function.
wasmer_version_patch()
Return the patch version of the Wasmer C API.
wasmer_version_patch() : int
Example
<?php
$patch = wasmer_version_patch();
⚠️ This is a Wasmer-specific function.
wasmer_version_pre()
Return the pre-release label of the Wasmer C API.
wasmer_version_pre() : string
This function will return an empty string if the Wasmer C API is stable.
Example
<?php
$pre = wasmer_version_pre();
⚠️ This is a Wasmer-specific function.
wat2wasm()
⚠️ This is a Wasmer-specific function.
wat2wasm(string $wat) : string
Parameters
- $wat : string