Meziantou.Framework.WasmEngine.Wasi namespace

Classes

NameDescription
WasiComponentContextThe environment of a WASI component (WASI 0.2 and WASI 0.3, https://github.com/WebAssembly/WASI): its arguments, environment variables, standard streams, clocks, random numbers, and the file system of its preopened directories. Define its imports (WasiComponentContext.DefineImports), instantiate the component, and run it (WasiComponentContext.Run).
WasiContextThe environment of a WASI Preview 1 program (wasi_snapshot_preview1): its arguments, environment variables, standard streams, clocks, random numbers, and the file system of its preopened directories. Define its imports (WasiContext.DefineImports), instantiate the module, and run it (WasiContext.Run).
WasiExceptionAn error of a WASI operation: the function returns WasiException.Errno to the module. A WasiFileSystem throws it to report an error with a precise code.
WasiExitExceptionThrown by the proc_exit function of WASI: it ends the execution of the module, and is thrown by the call into WebAssembly. WasiContext.Run catches it and returns WasiExitException.ExitCode.
WasiFileSystemA file system that a WASI module reads and writes through a preopened directory (see WasiPreopenedDirectory): WasiHostFileSystem for a directory of the disk, or WasiInMemoryFileSystem for files in memory.
WasiHostFileSystemA file system whose files are the files of a directory of the disk, which the module cannot leave.
WasiHostHttpClientAn HTTP client that sends the requests over the network of the machine (SocketsHttpHandler), with the rules of a WasiHostHttpClientOptions.
WasiHostHttpClientOptionsThe rules of a WasiHostHttpClient: which requests the component can send over the network of the machine.
WasiHostNetworkA network that uses the sockets of the machine (Socket), with the rules of a WasiHostNetworkOptions.
WasiHostNetworkOptionsThe rules of a WasiHostNetwork: what the component can do on the network of the machine.
WasiHttpClientThe HTTP client of a WASI component (wasi:http/client, see WasiOptions.HttpClient): it sends the requests of the component. WasiHostHttpClient sends them over the network of the machine, with the rules of a WasiHostHttpClientOptions; WasiInMemoryHttpClient gives them to a handler of the process.
WasiInMemoryFileSystemA file system in memory: files, directories, symbolic links and hard links that the module reads and writes, and that the host prepares (WasiInMemoryFileSystem.AddFile, WasiInMemoryFileSystem.AddDirectory, WasiInMemoryFileSystem.AddSymbolicLink) and reads (WasiInMemoryFileSystem.ReadAllBytes). It does not access the disk, so it works on every platform, including the browser.
WasiInMemoryHttpClientAn HTTP client that gives the requests to a handler of the process, without the network: a HttpMessageHandler (such as a mock), or a function. It works on every platform, including the browser.
WasiInMemoryNetworkA network inside the process: the sockets of the components connect to each other and to the host (WasiInMemoryNetwork.ConnectAsync, WasiInMemoryNetwork.Listen), without the network of the machine. It works on every platform, including the browser.
WasiInMemoryTcpListenerA listener of the host on a WasiInMemoryNetwork, created by WasiInMemoryNetwork.Listen.
WasiNetworkThe network of a WASI component (wasi:sockets, see WasiOptions.Network): the TCP and UDP sockets and the name lookups. WasiHostNetwork uses the network of the machine, with the rules of a WasiHostNetworkOptions; WasiInMemoryNetwork is a network inside the process.
WasiOptionsOptions of a WasiContext: what the module sees of its environment.
WasiPreopenedDirectoryA directory that a WASI module can access (see WasiOptions.PreopenedDirectories).
WasiTcpSocketA TCP socket of a WasiNetwork.
WasiUdpSocketA UDP socket of a WasiNetwork.

Structs

NameDescription
WasiDirectoryEntryAn entry of a directory, returned by WasiFileSystem.EnumerateDirectory.
WasiFileStatThe status of a file (filestat), returned by WasiFileSystem.GetStat.

Enums

NameDescription
WasiErrnoThe error codes of WASI Preview 1 (errno), returned by its functions.
WasiFileTypeThe type of a file (filetype).
WasiSocketAddressUseThe uses of an address that a WasiSocketAddressCheck checks.

Delegates

NameDescription
WasiHttpRequestCheckDecides whether a component can send a request (see WasiHostHttpClientOptions.RequestCheck).
WasiRandomSourceFills a buffer with random bytes (see WasiOptions.RandomSource).
WasiSocketAddressCheckDecides whether a component can use an address (see WasiHostNetworkOptions.AddressCheck).