Meziantou.Framework.WasmEngine.Components namespace

Classes

NameDescription
ComponentAsyncValueTypeAn asynchronous value type: a stream or a future of an optional element type.
ComponentBorrowTypeA borrow handle type: the receiver can use the resource during the call.
ComponentCallContextA call of a function of the host by a component.
ComponentComponentTypeThe type of a component: its imports and its exports.
ComponentEnumTypeAn enum type: one of several labels.
ComponentErrorContextAn error-context: an error that components pass to each other, with a message for the diagnostics.
ComponentExternTypeThe type of an import or an export of a component, of an instance or of a component type.
ComponentFlagsTypeA flags type: a set of labels (1 to 32 labels).
ComponentFunctionA function of the component model: a function exported by a component instance (ComponentFunction.Call), or a function of the host (ComponentFunction.FromCallback, ComponentFunction.FromAsyncCallback) given to the imports of a component.
ComponentFunctionTypeA function type of the component model: named parameters, an optional result, and whether it is asynchronous.
ComponentFutureReaderThe readable end of a future held by the host.
ComponentFutureTypeA future type: a value of an element type that a writer gives to a reader once.
ComponentFutureWriterThe writable end of a future held by the host.
ComponentHandleTypeA handle type: own or borrow of a resource type.
ComponentImportsThe imports of a component, by name: functions, instances (nested ComponentImports, or instances of other components), resource types, core modules and components. A name with a version (wasi:cli/stdout@0.2.3) also satisfies the imports of a compatible version (wasi:cli/stdout@0.2.0).
ComponentInstanceTypeThe type of a component instance: its exports.
ComponentLabelsTypeA type whose values are labels: an enum (one label) or flags (a set of labels).
ComponentListTypeA list type: a sequence of values of an element type, of a fixed length or not.
ComponentMapTypeA map type: entries of a key and a value.
ComponentModuleTypeThe type of a core module: its imports and its exports.
ComponentOptionTypeAn option type: a value of a type, or none.
ComponentOwnTypeAn own handle type: the receiver owns the resource and must drop it.
ComponentPrimitiveTypeA primitive value type: a number, bool, char, string or error-context.
ComponentRecordTypeA record type: named fields.
ComponentResourceA resource: a value of a resource type, referenced by handles. The representation of a resource implemented by the host is a .NET object; the representation of a resource implemented by a component is an integer of the component.
ComponentResourceTypeA resource type: an abstract type whose values are handles (ComponentOwnType, ComponentBorrowType). Resource types are compared by identity: each resource type definition of a component instance, and each resource type created by the host, is a distinct type.
ComponentResultTypeA result type: a success with an optional value, or an error with an optional value.
ComponentStreamReaderThe readable end of a stream held by the host: the host reads the values that a component writes. Use it on the thread of the store (in the functions of the host, whose continuations run there).
ComponentStreamTypeA stream type: values of an element type that a writer copies to a reader over time.
ComponentStreamWriterThe writable end of a stream held by the host: the host writes values that a component reads.
ComponentTupleTypeA tuple type: unnamed fields.
ComponentTypeA type of the component model: a value type, a function type, a resource type, a component type or an instance type.
ComponentValueTypeA value type of the component model. The value types are structural: two value types are equal when they have the same structure, except the handles, whose resource types are compared by identity.
ComponentVariantTypeA variant type: one of several named cases, each with an optional payload.
WasmComponentA compiled component (https://github.com/WebAssembly/component-model): it is instantiated by WasmStore.InstantiateComponent.
WasmComponentInstanceAn instance of a component, or an instance exported by a component: its exports.

Structs

NameDescription
ComponentCaseA case of a ComponentVariantType.
ComponentExternDescriptorA named import or export of a component, of an instance or of a component type.
ComponentFieldA field of a ComponentRecordType, or a parameter of a ComponentFunctionType.
ComponentValueA value of the component model, converted from or to the memory of a component by the canonical ABI. The values are immutable; their interpretation depends on their type: a record and a tuple are the values of their fields, a variant, an enum, an option and a result are a case (a label and an optional payload).
WasmComponentImportAn import or an export of a component: its name and its kind.

Enums

NameDescription
ComponentExternKindThe kinds of the definitions that a component imports or exports.
ComponentValueKindThe kinds of the values of the component model (see ComponentValue).
ComponentValueTypeKindThe kinds of the value types of the component model.

Delegates

NameDescription
ComponentHostAsyncCallbackThe steps of an asynchronous function of the host. The continuations of the task run on the thread that runs the components (between their calls), so they can use the values of the call, such as the streams.
ComponentHostCallbackThe steps of a function of the host: the arguments are converted to the result (null for a function without result), or an exception is thrown, which aborts the call of the component.