class Wasmer::FunctionType

Overview

FunctionType classifies the signature of functions, mapping a vector of parameters to a vector of results. They are also used to classify the inputs and outputs of instructions.

See also

Specification: https://webassembly.github.io/spec/core/syntax/types.html#function-types

Included Modules

Defined in:

wasmer/function.cr

Constructors

Instance Method Summary

Instance methods inherited from module Wasmer::WithExternType

to_externtype : ExternType to_externtype

Constructor Detail

def self.new(params : Array(ValueType), results : Array(ValueType)) #

Instantiates a new FunctionType from two ValueType arrays: parameters and the results

params = Wasmer.value_types
results = Wasmer.value_types(Wasmer::I32)
function_type = Wasmer::FunctionType.new(params, results)

[View source]
def self.new #

[View source]

Instance Method Detail

def params : Array(ValueType) #

Returns the parameters definitions from the FunctionType as a ValueType array


[View source]
def results : Array(ValueType) #

Returns the results definitions from the FunctionType as a ValueType array


[View source]
def to_externtype : ExternType #

[View source]