WasmComponentInstance class final
Component-level runtime that instantiates embedded core modules.
Current scope:
- Instantiates embedded core modules discovered in section
0x01. - Exposes direct core export invocation.
- Exposes component export aliases decoded from section
0x03for function/memory/table/global/tag exports. - Provides canonical ABI lowering/lifting wrappers over a selected memory.
Constructors
- WasmComponentInstance.fromBytes(Uint8List componentBytes, {WasmImports imports = const WasmImports(), WasmFeatureSet features = const WasmFeatureSet(componentModel: true), bool bestEffortDecode = false})
-
factory
- WasmComponentInstance.fromComponent(WasmComponent component, {WasmImports imports = const WasmImports(), WasmFeatureSet features = const WasmFeatureSet(componentModel: true)})
-
factory
Properties
- component → WasmComponent
-
final
-
coreInstances
→ List<
WasmInstance> -
final
- features → WasmFeatureSet
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- imports → WasmImports
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
componentExportGlobalBinding(
String exportName) → RuntimeGlobal -
componentExportKind(
String exportName) → WasmComponentImportKind -
componentExportMemory(
String exportName) → WasmMemory -
componentExportTable(
String exportName) → WasmTable -
componentExportTag(
String exportName) → WasmTagImport -
coreInstance(
[int moduleIndex = 0]) → WasmInstance -
coreInstanceByAlias(
String aliasName) → WasmInstance -
invokeCanonical(
{required String exportName, required List< WasmCanonicalAbiType> parameterTypes, required List<Object?> parameters, required List<WasmCanonicalAbiType> resultTypes, int moduleIndex = 0, int memoryIndex = 0, WasmCanonicalAbiAllocator? allocator}) → List<Object?> -
invokeCanonicalAsync(
{required String exportName, required List< WasmCanonicalAbiType> parameterTypes, required List<Object?> parameters, required List<WasmCanonicalAbiType> resultTypes, int moduleIndex = 0, int memoryIndex = 0, WasmCanonicalAbiAllocator? allocator}) → Future<List< Object?> > -
invokeComponentExport(
String exportName, {List< Object?> args = const []}) → Object? -
invokeComponentExportAsync(
String exportName, {List< Object?> args = const []}) → Future<Object?> -
invokeCore(
String exportName, {List< Object?> args = const [], int moduleIndex = 0}) → Object? -
invokeCoreAsync(
String exportName, {List< Object?> args = const [], int moduleIndex = 0}) → Future<Object?> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readComponentExportGlobal(
String exportName) → Object? -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited