package tezos-wasmer

  1. Overview
  2. Docs
module Config : sig ... end
module Engine : sig ... end
module Store : sig ... end
module Ref : sig ... end
type _ typ

WebAssembly type

val i32 : int32 typ

32-bit integer

val i64 : int64 typ

64-bit integer

val f32 : float typ

32-bit floating point number

val f64 : float typ

64-bit floating point number

val anyref : Ref.t typ

Generic reference

val funcref : Ref.t typ

Function reference

type _ fn

Function type

val (@->) : 'a typ -> 'b fn -> ('a -> 'b) fn

x @-> f composes a function type such that x is in the contravariant position and f in the covariant position.

val returning1 : 'a typ -> 'a Lwt.t fn

returning1 ret describes a function that receives no arguments and returns a single value of type ret.

type 'a ret

Return type

val nothing : unit ret

nothing returns nothing.

val ret1 : 'a typ -> 'a ret

ret1 typ constructs a return type for one value of type typ.

val (@**) : 'a typ -> 'b typ -> ('a * 'b) ret

a @** b composes two types as a tuple return type such that two values of respectively type a and b are returned.

val (@*) : 'a typ -> 'b ret -> ('a * 'b) ret

x @* xs composes things similarly to @** with the addition that the second parameter may already be a composite type.

val returning : 'a ret -> 'a Lwt.t fn

returning ret constructs a function type which receives no parameters from the WebAssembly side, but returns values as described by ret.

val producer : 'a ret -> (unit -> 'a Lwt.t) fn

producer ret works similar to returning but adds an extra unit argument so that the effects of the implementing function trigger at call time.

type extern

Something that can be given to a WebAssembly module via an import

val fn : 'a fn -> 'a -> extern

Construct an extern function.

module Module : sig ... end
module Memory : sig ... end
module Instance : sig ... end
module Exports : sig ... end
OCaml

Innovation. Community. Security.