Crate linera_witty

source ·
Expand description

Linera Witty

This crate allows generating WIT files and host side code to interface with WebAssembly guests that adhere to the WIT interface format. The source of truth for the generated code and WIT files is the Rust source code.

Modules§

Macros§

  • Returns a type signature for an HList of the provided types
  • Returns an HList based on the values passed in.
  • Macro for pattern-matching on HLists.

Structs§

  • An address for a location in a guest WebAssembly module’s memory.
  • Represents the most basic non-empty HList. Its value is held in head while its tail is another HList.
  • Represents the right-most end of a heterogeneous list
  • A handle to interface with a guest Wasm module instance’s memory.
  • A helper type to verify how many times an exported function is called.
  • A fake Wasm instance.
  • A fake Wasm runtime.

Enums§

  • Errors that can occur when using a Wasm runtime.

Traits§

  • A type that accepts registering a host function as an export for a guest Wasm instance.
  • A type that can register some functions as exports for the target Instance.
  • Representation of an exported host function’s interface.
  • Typeclass for HList-y behaviour
  • Representation of an imported function’s interface.
  • An active guest Wasm module.
  • How a runtime supports a function signature.
  • Trait alias for a Wasm module instance with the WIT Canonical ABI functions.
  • Allows converting between the current flat layout and the joined Target flat layout, which may be longer or have some elements wider than the current elements.
  • Representation of the memory layout of complex types as a sequence of fundamental WIT types.
  • Merging of two heterogeneous lists, resulting in a new heterogeneous list where every element is of type Either<Left, Right>, where Left is an element from the current list and Right is an element from the Other list.
  • A helper trait to serve as an equivalent to crate::wasmer::WasmerResults and crate::wasmtime::WasmtimeResults for the MockInstance.
  • Trait to register a compile-time list of WitTypes into a BTreeMap.
  • A Wasm runtime.
  • Interface for accessing a runtime specific memory.
  • Compile time splitting of heterogeneous lists.
  • A type that can be loaded from a guest Wasm module.
  • A type that can be stored in a guest Wasm module.
  • A type that is representable by fundamental WIT types.

Attribute Macros§

  • Registers an impl block’s functions as callable host functions exported to guest Wasm modules.
  • Generates a generic type from a trait.

Derive Macros§

  • Derives WitLoad for the Rust type.
  • Derives WitStore for the Rust type.
  • Derives WitType for a Rust type.