Wasmex.Components.Component (wasmex v0.14.0)

A WebAssembly Component that can be instantiated.

Components are compiled WebAssembly modules that follow the Component Model specification. They define imports and exports using WIT (WebAssembly Interface Types).

Summary

Functions

Compiles a new WebAssembly component from bytes.

Types

t()

@type t() :: %Wasmex.Components.Component{reference: reference(), resource: binary()}

Functions

new(store_or_caller, component_bytes)

Compiles a new WebAssembly component from bytes.

Parameters

  • store - The store to compile the component for
  • bytes - Raw WebAssembly component bytes

Returns

  • {:ok, component} on success
  • {:error, reason} on failure