WASIPreview3ComponentHost class final
WASI 0.3 / Preview3 component host boundary.
This fixed-version wrapper keeps Preview3 adapter code on the async-aware component profile while host capability gaps remain explicitly reported.
Constructors
-
WASIPreview3ComponentHost({WASIComponentHost? componentHost, WASIPreview2ComponentHost? preview2CompatibilityHost, WASIPreview3CliHost? cliHost, WASIPreview3ClocksHost? clocksHost, WASIPreview3FilesystemHost? filesystemHost, WASIPreview3HttpHost? httpHost, WASIPreview3RandomHost? randomHost, WASIPreview3SocketsHost? socketsHost, List<
String> args = const <String>[], Map<String, String> env = const <String, String>{}, String? initialCwd, List<int> stdinData = const <int>[], WASIComponentReadableStream<int> ? stdin, WASIPreview3CliOutputHandler? stdout, WASIPreview3CliOutputHandler? stderr, Map<String, String> preopens = const <String, String>{}, bool canMutatePreopens = false, bool? terminalStdin, bool? terminalStdout, bool? terminalStderr, WASIPreview3AddressResolver? resolveAddresses, WASIPreview3HttpBackend? handlerBackend}) -
Creates a Preview3 component host over
componentHostor a new host.factory -
WASIPreview3ComponentHost.native({WASIComponentHost? componentHost, WASIPreview2ComponentHost? preview2CompatibilityHost, WASIPreview3CliHost? cliHost, WASIPreview3ClocksHost? clocksHost, WASIPreview3FilesystemHost? filesystemHost, WASIPreview3HttpHost? httpHost, WASIPreview3RandomHost? randomHost, WASIPreview3SocketsHost? socketsHost, List<
String> args = const <String>[], Map<String, String> env = const <String, String>{}, String? initialCwd, List<int> stdinData = const <int>[], WASIComponentReadableStream<int> ? stdin, WASIPreview3CliOutputHandler? stdout, WASIPreview3CliOutputHandler? stderr, Map<String, String> preopens = const <String, String>{}, bool canMutatePreopens = false, bool? terminalStdin, bool? terminalStdout, bool? terminalStderr, WASIPreview3AddressResolver? resolveAddresses, WASIPreview3HttpBackend? handlerBackend}) -
Creates a Dart VM-native Preview3 component host.
factory
Properties
- cliHost → WASIPreview3CliHost
-
CLI host state and captured stdio for standard
wasi:cliimports.no setter - clocksHost → WASIPreview3ClocksHost
-
Clocks host state for standard
wasi:clocksimports.no setter - componentHost → WASIComponentHost
-
Shared component host.
no setter
- filesystemHost → WASIPreview3FilesystemHost
-
Filesystem host state for standard
wasi:filesystemimports.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- httpHost → WASIPreview3HttpHost
-
HTTP host state for standard
wasi:httpimports.no setter - preview2CompatibilityHost → WASIPreview2ComponentHost
-
Preview2 imports used by adapters embedded in Preview3 components.
no setter
- profile → WASIComponentVersionProfile
-
Preview3 version profile.
no setter
- randomHost → WASIPreview3RandomHost
-
Random host state for standard
wasi:randomimports.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- socketsHost → WASIPreview3SocketsHost
-
Sockets host state for standard
wasi:socketsimports.no setter -
standardImports
→ Map<
String, WASIComponentWitAdapterCallback> -
Standard Preview3 0.3.0/0.3.1 callbacks and Preview2 compatibility imports.
latefinal
- versionedHost → WASIComponentVersionedHost
-
Underlying versioned component-host facade.
final
Methods
-
bindAdapters(
WasmComponent component, {bool validate = true, Map< int, WASIComponentCanonicalAdapterCallback> coreFunctions = const <int, WASIComponentCanonicalAdapterCallback>{}, Map<int, WASIComponentCanonicalAdapterCallback> componentFunctions = const <int, WASIComponentCanonicalAdapterCallback>{}}) → WASIComponentCanonicalAdapterProgram -
Prepares and binds Preview3 canonical
lift/loweradapter operations. -
bindComponent(
WasmComponent component, {bool validate = true, Map< int, WASIComponentCanonicalAdapterCallback> coreFunctions = const <int, WASIComponentCanonicalAdapterCallback>{}, Map<int, WASIComponentCanonicalAdapterCallback> componentFunctions = const <int, WASIComponentCanonicalAdapterCallback>{}, String resourceName(WASIComponentResourceBinding binding)?, void onResourceDrop(WASIComponentResourceBinding binding, Object resource)?, String asyncValueName(WASIComponentAsyncValueBinding binding)?, int? maxBufferedElementsForStream(WASIComponentAsyncValueBinding binding)?, void onAsyncValueDrop(WASIComponentAsyncValueBinding binding)?}) → WASIComponentHostBinding -
Prepares and binds
componentthrough the Preview3 profile. -
bindWitWorld(
WASIComponentWitDocument document, {String? worldName, Map< String, WASIComponentWitAdapterCallback> imports = const <String, WASIComponentWitAdapterCallback>{}, Map<String, WASIComponentWitAdapterCallback> exports = const <String, WASIComponentWitAdapterCallback>{}}) → WASIComponentWitAdapterProgram - Prepares and binds a Preview3 WIT world.
-
close(
{bool force = false}) → void - Releases resources created and owned by this component host.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prepareComponent(
WasmComponent component, {bool validate = true}) → WASIComponentVersionedBindingPlan -
Prepares
componentfor Preview3 component-host binding. -
prepareWitWorld(
WASIComponentWitDocument document, {String? worldName}) → WASIComponentVersionedWitWorldPlan - Prepares a WIT world for Preview3 adapter binding.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited