module

Wasmer

A complete and mature WebAssembly runtime for Crystal based on Wasmer.

Constants

F32 = ValueKind::F32
F64 = ValueKind::F64
I32 = ValueKind::I32

handy constants to ValueKind so one can use Wasmer::I32 instead of Wasmer::ValueKind::I32

I64 = ValueKind::I64
Immutable = GlobalMutability::Immutable
Mutable = GlobalMutability::Mutable
VERSION = {{ (`shards version \"/tmp/tmp.KCDHME/src/src\"`).chomp.stringify.downcase }}

Class methods

c_to_valuelist(values : LibWasmer::WasmValVecT) : Array(Value)
Source
default_engine

Instantiates and returns a new default engine

Source
dylib_engine

Instantiates and returns a new Dylib engine

Source
engine(config : Config)

Instantiates and returns a new Engine with default configuration

Source
max_unbound

Returns the value used to represent an unbound limit. i.e. when a limit only has a min but not a max. See Limits

Source
module(store : Store, wat : String | Bytes)

Helper method to return an instance of Module

Source
new_instance(mod : Module, imports : ImportObject = ImportObject.new)
Source
universal_engine

Instantiates and returns a new Universal engine

Source
value_types(kinds : Array(ValueKind)) : Array(ValueType)
Source
value_types
Source
value_types(*kinds : ValueKind) : Array(ValueType)

Instantiates a new ValueType array from a list of ValueKind. Helper function specifically designed to help you declare function types

Source
version
Source
wat2wasm(wat : String) : Bytes

wat2wasm parses a string as either WAT or a binary Wasm module See https://webassembly.github.io/spec/core/text/index.html Note: This is not part of the standard Wasm C API. It is Wasmer specific

Source

Nested types