Module wasmer

Wasmer Engine API

An idiomatic D wrapper of the Wasmer Runtime providing an implementation of the WebAssembly C API.

See Also

The official Wasmer Runtime C API documentation.

Functions

NameDescription
functype(_) Get the wasm_functype_t of a D function that satisfies isCallableAsFunction.

Classes

NameDescription
Engine A wasmer engine used to instntiate a Store.
Extern An external value, which is the runtime representation of an entity that can be imported or exported.
Function A WebAssembly function reference.
Handle Manages a native handle to a Wasmer structure.
Instance A WebAssembly virtual machine instance.
Memory A block of memory.
Module A WebAssembly module.
Store All runtime objects are tied to a specific store.
Trap Used to immediately terminate execution and signal abnormal behavior to the execution environment.
Value A WebAssembly value, wrapping an int, long, float, or double.

Manifest constants

NameTypeDescription
isCallableAsFunction Detect whether T is callable as a Function.
isInstance Detect whether T is an Instance.
isModule Detect whether T is an Module.
pageSize Size in bytes of one page of WebAssembly memory. One page of memory is 64 kB.

Aliases

NameTypeDescription
Callback extern(C) wasmer.bindings.wasm_trap_t* function(const(wasmer.bindings.wasm_val_vec_t*), wasmer.bindings.wasm_val_vec_t*) A function to be called from WASM code.
CallbackWithDelegate void delegate(Module, Value[], Value[]) A delegate to be called from WASM code.
CallbackWithEnv extern(C) wasmer.bindings.wasm_trap_t* function(void*, const(wasmer.bindings.wasm_val_vec_t*), wasmer.bindings.wasm_val_vec_t*) A function to be called from WASM code. Includes an environment variable.
Limits wasmer.bindings.wasm_limits_t Limits of the page size of a block of Memory. One page of memory is 64 kB.