Minimal WASI runtime interface.
Constructors
-
WASI({List<
String> args = const [], Map<String, String> env = const {}, Map<String, String> preopens = const {}, Map<String, Uint8List> files = const {}, bool returnOnExit = true, int stdin = 0, List<int> stdinData = const <int>[], int stdout = 1, int stderr = 2, Map<int, WASIPreview1Socket> sockets = const <int, WASIPreview1Socket>{}, WASIOutputSink? stdoutSink, WASIOutputSink? stderrSink, WASIProcRaiseHandler? procRaiseHandler, WASIVersion version = WASIVersion.preview1}) -
Creates a WASI runtime with the given options.
factory
Properties
Methods
-
finalizeBindings(
Instance instance, {Memory? memory}) → void - Binds the WASI runtime to an instance's memory.
-
initialize(
Instance instance) → void -
Initializes a WASI reactor module by invoking its
_initializeexport. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
Instance instance) → int -
Starts a WASI command module by invoking its
_startexport. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
preview2(
{List< String> args = const <String>[], Map<String, String> env = const <String, String>{}, String? initialCwd, List<int> stdinData = const <int>[], Map<String, String> preopens = const <String, String>{}, bool canMutatePreopens = false, bool? terminalStdin, bool? terminalStdout, bool? terminalStderr, WASIPreview2AddressResolver? resolveAddresses}) → WASIPreview2ComponentHost - Creates a WASI 0.2 / Preview2 component host.
-
preview3(
{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}) → WASIPreview3ComponentHost - Creates a WASI 0.3 / Preview3 component host.