module Wasmer

Overview

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

Defined in:

wasmer.cr
wasmer/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 use Wasmer::I32 instead of Wasmer::ValueKind::I32

I64 = ValueKind::I64
Immutable = GlobalMutability::Immutable
Mutable = GlobalMutability::Mutable
VERSION = {{ (`shards version \"/srv/crystaldoc.info/github-naqvis-wasmer-crystal-v0.2.3/src\"`).chomp.stringify.downcase }}

Class Method Summary

Class Method Detail

def self.c_to_valuelist(values : LibWasmer::WasmValVecT) : Array(Value) #

[View source]
def self.default_engine #

Instantiates and returns a new default engine


[View source]
def self.dylib_engine #

Instantiates and returns a new Dylib engine


[View source]
def self.engine(config : Config) #

Instantiates and returns a new Engine with default configuration


[View source]
def self.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


[View source]
def self.module(store : Store, wat : String | Bytes) #

Helper method to return an instance of Module


[View source]
def self.new_instance(mod : Module, imports : ImportObject = ImportObject.new) #

[View source]
def self.universal_engine #

Instantiates and returns a new Universal engine


[View source]
def self.value_types(kinds : Array(ValueKind)) : Array(ValueType) #

[View source]
def self.value_types : Array(ValueType) #

[View source]
def self.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


[View source]
def self.version #

[View source]
def self.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


[View source]