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§

hlist
Module that holds HList data structures, implementations, and typeclasses.
wit_generation
Generation of WIT files.

Macros§

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

Structs§

GuestPointer
An address for a location in a guest WebAssembly module’s memory.
HCons
Represents the most basic non-empty HList. Its value is held in head while its tail is another HList.
HNil
Represents the right-most end of a heterogeneous list
Memory
A handle to interface with a guest Wasm module instance’s memory.

Enums§

RuntimeError
Errors that can occur when using a Wasm runtime.

Traits§

ExportFunction
A type that accepts registering a host function as an export for a guest Wasm instance.
ExportTo
A type that can register some functions as exports for the target Instance.
ExportedFunctionInterface
Representation of an exported host function’s interface.
HList
Typeclass for HList-y behaviour
ImportedFunctionInterface
Representation of an imported function’s interface.
Instance
An active guest Wasm module.
InstanceWithFunction
How a runtime supports a function signature.
InstanceWithMemory
Trait alias for a Wasm module instance with the WIT Canonical ABI functions.
JoinFlatLayouts
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.
Layout
Representation of the memory layout of complex types as a sequence of fundamental WIT types.
Merge
Merging of two heterogeneous lists, resulting in a new heterogenous 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.
RegisterWitTypes
Trait to register a compile-time list of WitTypes into a BTreeMap.
Runtime
A Wasm runtime.
RuntimeMemory
Interface for accessing a runtime specific memory.
Split
Compile time splitting of heterogeneous lists.
WitLoad
A type that can be loaded from a guest Wasm module.
WitStore
A type that can be stored in a guest Wasm module.
WitType
A type that is representable by fundamental WIT types.

Attribute Macros§

wit_import
Generates a generic type from a trait.

Derive Macros§

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