module Wasmer
Overview
A complete and mature WebAssembly runtime for Crystal based on Wasmer.
Defined in:
wasmer.crwasmer/config.cr
wasmer/engine.cr
wasmer/exports.cr
wasmer/extern.cr
wasmer/function.cr
wasmer/global.cr
wasmer/import.cr
wasmer/instance.cr
wasmer/lib.cr
wasmer/limits.cr
wasmer/memory.cr
wasmer/module.cr
wasmer/pages.cr
wasmer/store.cr
wasmer/table.cr
wasmer/target.cr
wasmer/trap.cr
wasmer/value.cr
wasmer/wat.cr
Constant Summary
-
F32 =
ValueKind::F32
-
F64 =
ValueKind::F64
-
I32 =
ValueKind::I32
-
handy constants to
ValueKind
so one can useWasmer::I32
instead ofWasmer::ValueKind::I32
-
I64 =
ValueKind::I64
-
Immutable =
GlobalMutability::Immutable
-
Mutable =
GlobalMutability::Mutable
-
VERSION =
{{ (`shards version \"/Users/runner/work/wasmer-crystal/wasmer-crystal/src\"`).chomp.stringify.downcase }}
Class Method Summary
- .c_to_valuelist(values : LibWasmer::WasmValVecT) : Array(Value)
-
.default_engine
Instantiates and returns a new default engine
-
.dylib_engine
Instantiates and returns a new Dylib engine
-
.engine(config : Config)
Instantiates and returns a new Engine with default configuration
-
.max_unbound
Returns the value used to represent an unbound limit.
-
.module(store : Store, wat : String | Bytes)
Helper method to return an instance of
Module
- .new_instance(mod : Module, imports : ImportObject = ImportObject.new)
-
.universal_engine
Instantiates and returns a new Universal engine
- .value_types(kinds : Array(ValueKind)) : Array(ValueType)
- .value_types : Array(ValueType)
-
.value_types(*kinds : ValueKind) : Array(ValueType)
Instantiates a new ValueType array from a list of ValueKind.
- .version
-
.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.
Class Method Detail
Instantiates and returns a new Engine with default configuration
Returns the value used to represent an unbound limit.
i.e. when a limit only has a min but not a max.
See Limits
Helper method to return an instance of Module
Instantiates a new ValueType array from a list of ValueKind. Helper function specifically designed to help you declare function types
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