Module syscalls Copy item path Source pub use wasi ::*;pub use wasix ::*;pub use journal ::*;pub use unix ::*;io π Traits, helpers, and type definitions for core I/O functionality. journal legacy These modules provide wrappers and implementations for older version of WASI. mpsc π Multi-producer, single-consumer FIFO queue communication primitives. types unix wasi wasix debug π Constructs an event at the debug level. error π Constructs an event at the error level. trace π Constructs an event at the trace level. warn π Constructs an event at the warn level. Arc π A thread-safe reference-counting pointer. βArcβ stands for βAtomically
Reference Countedβ. AsyncifyPoller π AtomicBool π A boolean type which can be safely shared between threads. AtomicU32 π An integer type which can be safely shared between threads. AtomicU64 π An integer type which can be safely shared between threads. Bytes π A cheaply cloneable and sliceable chunk of contiguous memory. BytesMut π A unique reference to a contiguous slice of memory. Condvar π A Condition Variable Context π The context of an asynchronous task. Dirent π A directory entry. DlFlags π DuplexPipe π A pair of pipes that are connected together. Duration π A Duration type to represent a span of time, typically used for system
timeouts. Event π An event that occurred. EventFdReadwrite π The contents of an event for the eventtype::fd_read and
eventtype::fd_write variants Eventrwflags π The state of the file descriptor subscribed to with
eventtype::fd_read or eventtype::fd_write. ExitCode π Fdflags π File descriptor flags. Fdflagsext π Fdstat π File descriptor attributes. Filestat π Fstflags π Which file time attributes to adjust.
TODO: wit appears to not have support for flags repr
(@witx repr u16) Function π A WebAssembly function instance. FunctionEnv π An opaque reference to a function environment.
The function environment data is owned by the Store. FunctionEnvMut π A temporary handle to a FunctionEnv . Global π A WebAssembly global instance. HashMap π A hash map implemented with quadratic probing and SIMD lookup. HashSet π A hash set implemented as a HashMap where the value is (). InfiniteSleep Instance π A WebAssembly Instance is a stateful, executable
instance of a WebAssembly Module . Ipv4Addr π An IPv4 address. Ipv6Addr π An IPv6 address. LocalKey π A thread local storage (TLS) key which owns its contents. Memory π A WebAssembly memory instance. Memory32 π Marker trait for 32-bit memories. Memory64 π Marker trait for 64-bit memories. MemoryView π A WebAssembly memory view. Module π A WebAssembly Module contains stateless WebAssembly
code that has already been compiled and can be instantiated
multiple times. Mutex π A mutual exclusion primitive useful for protecting shared data OptionFd π Pages π Units of WebAssembly pages (as specified to be 65,536 bytes). Path π A slice of a path (akin to str ). Pin π A pointer which pins its pointee in place. Prestat π ProcSpawnFdOp π An FD operation performed during proc_spawn2, which is the backing syscall for posix_spawn. RefCell π A mutable memory location with dynamically checked borrow rules Rights π File descriptor rights, determining which actions may be performed. RuntimeError π A struct representing an aborted instruction execution, with a message
indicating the cause. SignalDisposition π A signal and its corresponding action. StackSnapshot π Store π The store represents all global state that can be manipulated by
WebAssembly programs. It consists of the runtime representation
of all instances of functions, tables, memories, and globals that
have been allocated during the lifetime of the abstract machine. Subscription π SubscriptionFsReadwrite π An event that occurred.
The contents of an event.
An event that occurred.
The contents of a subscription, snapshot0 version.
The contents of a subscription.
The contents of a subscription when the variant is
eventtype::fd_read or eventtype::fd_write. Tty π TypedFunction π A WebAssembly function that can be called natively
(using the Native ABI). WasmPtr π A zero-cost type that represents a pointer to something in Wasm linear
memory. WasmSlice π Reference to an array of values in Wasm memory. __wasi_asyncify_t π Addressfamily π Advice π File or memory access pattern advisory information. AsyncifyAction Clockid π Identifiers for clocks. Cow π A clone-on-write smart pointer. Entry π A view into a single entry in a map, which may either be vacant or occupied. Errno π Error codes returned by functions.
Not all of these error codes are returned by the functions provided by this
API; some are used in higher-level library layers, and others are provided
merely for alignment with POSIX. Eventtype π Type of a subscription to an event or its occurrence. Extern π An Extern is the runtime representation of an entity that
can be imported or exported. Filetype π The type of a file descriptor or file. FsError π Error type for external users HandleRewindType π Infallible π The error type for errors that can never happen. IpAddr π An IP address, either IPv4 or IPv6. MemoryAccessError π Error for invalid Memory access. MemoryError π Error type describing things that can go wrong when operating on Wasm Memories. OnCalledAction π After the stack is unwound via asyncify what
should the call loop do next Ordering π Atomic memory orderings Poll π Indicates whether a value is available or if the current task has been
scheduled to receive a wakeup instead. Snapshot0Clockid π Identifiers for clocks, snapshot0 version. SocketAddr π An internet socket address, either IPv4 or IPv6. Sockoption π Sockstatus π Socktype π StreamSecurity π Streamsecurity π Value π WebAssembly computations manipulate values of basic value types: WasiStdioMode π Whence π AsStoreMut π Helper trait for a value that is convertible to a [StoreMut]. AsStoreRef π Helper trait for a value that is convertible to a [StoreRef]. AsyncSeekExt π An extension trait that adds utility methods to AsyncSeek types. AsyncWriteExt π Writes bytes to a sink. Borrow π A trait for borrowing data. Deref π Used for immutable dereferencing operations, like *v. DerefMut π Used for mutable dereferencing operations, like in *v = 1;. FileSystem π IntoWaker π Objects that can be converted into an Waker . This trait is
automatically implemented for types that fulfill the waker interface.
Such types must be: MemorySize π Trait for the Memory32 and Memory64 marker types. Read π The Read trait allows for reading bytes from a source. Seek π The Seek trait provides a cursor which can be moved within a stream of
bytes. TryInto π An attempted conversion that consumes self, which may or may not be
expensive. VirtualFile π This trait relies on your file closing when it goes out of scope via Drop Write π A trait for objects which are byte-oriented sinks. __asyncify π Asyncify takes the current thread and blocks on the async runtime associated with it
thus allowed for asynchronous operations to execute. It has built in functionality
to (optionally) timeout the IO, force exit the process, callback signals and pump
synchronous IO engine __asyncify_light π Asyncify takes the current thread and blocks on the async runtime associated with it
thus allowed for asynchronous operations to execute. It has built in functionality
to (optionally) timeout the IO, force exit the process, callback signals and pump
synchronous IO engine __asyncify_with_deep_sleep π Asyncify takes the current thread and blocks on the async runtime associated with it
thus allowed for asynchronous operations to execute. It has built in functionality
to (optionally) timeout the IO, force exit the process, callback signals and pump
synchronous IO engine __sock_actor π Performs an immutable operation on the socket while running in an asynchronous runtime
This has built in signal support __sock_actor_mut π Performs mutable work on a socket under an asynchronous runtime with
built in signal processing __sock_asyncify π Performs an immutable operation on the socket while running in an asynchronous runtime
This has built in signal support __sock_asyncify_mut π Performs mutable work on a socket under an asynchronous runtime with
built in signal processing __sock_upgrade π Replaces a socket with another socket in under an asynchronous runtime.
This is used for opening sockets or connecting sockets which changes
the fundamental state of the socket to another state machine _prepare_wasi π anyhow_err_to_runtime_err block_on_with_timeout π conv_spawn_err_to_errno π conv_spawn_err_to_exit_code π copy_from_slice π deep_sleep π Puts the process to deep sleep and wakes it again when
the supplied future completes from_offset π get_current_time_in_nanos π get_memory_stack π get_memory_stack_offset π β get_memory_stack_pointer π β get_stack_lower π get_stack_upper π handle_rewind π β handle_rewind_ext π β handle_rewind_ext_with_default π β maybe_backoff π Exponentially increasing backoff of CPU usage read_bytes π rewind rewind_ext rewind_ext2 set_memory_stack π set_memory_stack_offset π stderr_write β Writes data to the stderr to_offset π transmute π β Deprecated Reinterprets the bits of a value of one type as another type. unwind write_buffer_array π write_bytes π write_bytes_inner π AsyncifyFuture Future that will be polled by asyncify methods
(the return value is what will be returned in rewind
or in the instant response) Dircookie π A reference to the offset of a directory entry. DlHandle π Filesize π Non-negative file size or length of a region within a file. Linkcount π Longsize π Long size used by checkpoints NonZeroU64 π A u64 that is known not to equal zero. Pid π Sha256 π SHA-256 hasher. Tid π Timestamp π Timestamp in nanoseconds. TlKey π Thread local key TlUser π Thread local user data (associated with the value) TlVal π Thread local value WasiFd π A file descriptor handle. EventUnion π The contents of an event.