package wasmer

  1. Overview
  2. Docs
OCaml bindings for Wasmer

Install

Dune Dependency

Authors

Maintainers

Sources

v1.2.1+dunefix.tar.gz
md5=be37208390097ed6b7c7d9ede3c1a2a7
sha512=2422c3b32ae053a9f39336b1c9829ec9a508dd7d303e9a68853287ab7dea90b7cbc57f54a04b20a9fb6217527e1c89e8f806349407db5f8679d90fdf7dd3038e

doc/wasmer/Wasmer/index.html

Module WasmerSource

This module contains all bindings. Currently, only bindings to functions in wasm.h have been implemented.

Sourceexception Returned_null of string

A C function returned NULL where a non-null value was required

Sourceexception Invalid_access of string

A pointer was accessed but its ownership realtive to the caller was not high enough. For example, trying to get a pointer using get_ptr while the pointer was given away will raise this exception.

Sourcetype object_state =
  1. | State_Owned
    (*

    The object is owned by the caller.

    *)
  2. | State_RW
    (*

    The object is accessible by the caller.

    *)
  3. | State_Const
    (*

    The object is accessible by the caller in read-only.

    *)
  4. | State_Dependent of (unit -> object_state) * object_state dependent_update_func
    (*

    The object's state depends on another. The first function is to get the current state, the second function updates it.

    *)
  5. | State_PassedAway
    (*

    The current pointer has been given away.

    *)

The state of the ownership of the pointed-to object.

Sourceval get_real_state : object_state -> object_state

Gets the real state of the object_state. Never returns WasmerBindings.object_state.State_Dependent.

Sourceval max_state_const : object_state -> object_state

Gets the real state of the object_state, and reduces the ownership to read-only if required. This is the same as get_real_state st if the result is not WasmerBindings.object_state.State_Owned or WasmerBindings.object_state.State_RW, and is WasmerBindings.object_state.State_Const otherwise.

Sourcemodule type ObjectType = sig ... end

The metadata type for ownable objects

Sourcemodule type StructType = sig ... end

The metadata type for structure-declaring objects

Sourcemodule type VectorType = sig ... end

The metadata type for vector structures

Sourcemodule OwnableObject (O : ObjectType) : sig ... end

Ownable objects are the basic structure that maintains an ownership state on C objects.

Sourcemodule DeclareOwn (T : StructType) : sig ... end

The base WASM objects, declared in wasm.h as WASM_DECLARE_OWN.

Sourcemodule DeclareVec (U : VectorType) : sig ... end

The vector type, declared in the C API with the WASM_DECLARE_VEC macro. Vectors always get ownership of their data.

Sourcemodule DeclareType (T : StructType) : sig ... end
Sourcemodule DeclareRefBase (T : StructType) : sig ... end
Sourcemodule Ref : sig ... end
Sourcemodule DeclareRef (T : StructType) : sig ... end
Sourcemodule Wasi_ : sig ... end
Sourcemodule Byte : sig ... end
Sourcemodule Name : sig ... end
Sourcemodule Message : sig ... end

Embedders may provide custom functions for manipulating configs.

Sourcemodule Config : sig ... end
Sourcemodule Engine : sig ... end
Sourcemodule Store : sig ... end
Sourcemodule Mutability : sig ... end
Sourcemodule Limits : sig ... end
Sourcemodule Valkind : sig ... end
Sourcemodule Valtype : sig ... end
Sourcemodule Functype : sig ... end
Sourcemodule Globaltype : sig ... end
Sourcemodule Tabletype : sig ... end
Sourcemodule Memorytype : sig ... end
Sourcemodule Externkind : sig ... end
Sourcemodule Externtype : sig ... end
Sourcemodule Importtype : sig ... end
Sourcemodule Exporttype : sig ... end
Sourcemodule Val : sig ... end
Sourcemodule DeclareShareableRef (T : StructType) : sig ... end
Sourcemodule Frame : sig ... end
Sourcemodule Trap : sig ... end
Sourcemodule Foreign : sig ... end
Sourcemodule Module : sig ... end
Sourcemodule Func : sig ... end
Sourcemodule Global : sig ... end
Sourcemodule Table : sig ... end
Sourcemodule Memory : sig ... end
Sourcemodule Extern : sig ... end
Sourcemodule Instance : sig ... end
Sourceval frame_instance : Frame.s -> Instance.s
Sourcemodule Wasi : sig ... end
Sourcemodule Util : sig ... end
OCaml

Innovation. Community. Security.