Module wasix::lib_generated32

source ·

Modules

Structs

Constants

Functions

  • Read command-line argument data. The size of the array should match that returned by args_sizes_get. Each argument is expected to be \0 terminated.
  • Return command-line argument data sizes.
  • Registers a callback function for signals
  • Sets the current working directory
  • Return the resolution of a clock. Implementations are required to provide a non-zero value for supported clocks. For unsupported clocks, return errno::inval. Note: This is similar to clock_getres in POSIX.
  • Return the time value of a clock. Note: This is similar to clock_gettime in POSIX.
  • Sets the time value of a clock. Note: This is similar to clock_settime in POSIX.
  • Read environment variable data. The sizes of the buffers should match that returned by environ_sizes_get. Key/value pairs are expected to be joined with =s, and terminated with \0s.
  • Return environment variable data sizes.
  • Create an epoll interest list
  • Modifies an epoll interest list
  • wait for an I/O event on an epoll file descriptor
  • Provide file advisory information on a file descriptor. Note: This is similar to posix_fadvise in POSIX.
  • Force the allocation of space in a file. Note: This is similar to posix_fallocate in POSIX.
  • Close a file descriptor. Note: This is similar to close in POSIX.
  • Synchronize the data of a file to disk. Note: This is similar to fdatasync in POSIX.
  • Atomically duplicate a file handle.
  • Creates a file handle for event notifications
  • Get the attributes of a file descriptor. Note: This returns similar flags to fsync(fd, F_GETFL) in POSIX, as well as additional fields.
  • Adjust the flags associated with a file descriptor. Note: This is similar to fcntl(fd, F_SETFL, flags) in POSIX.
  • Adjust the rights associated with a file descriptor. This can only be used to remove rights, and returns errno::notcapable if called in a way that would attempt to add rights
  • Return the attributes of an open file.
  • Adjust the size of an open file. If this increases the file’s size, the extra bytes are filled with zeros. Note: This is similar to ftruncate in POSIX.
  • Adjust the timestamps of an open file or directory. Note: This is similar to futimens in POSIX.
  • Opens a pipe with two file handles
  • Read from a file descriptor, without using and updating the file descriptor’s offset. Note: This is similar to preadv in POSIX.
  • Return a description of the given preopened file descriptor.
  • Return a description of the given preopened file descriptor.
  • Write to a file descriptor, without using and updating the file descriptor’s offset. Note: This is similar to pwritev in POSIX.
  • Read from a file descriptor. Note: This is similar to readv in POSIX.
  • Read directory entries from a directory. When successful, the contents of the output buffer consist of a sequence of directory entries. Each directory entry consists of a dirent object, followed by dirent::d_namlen bytes holding the name of the directory entry. This function fills the output buffer as much as possible, potentially truncating the last directory entry. This allows the caller to grow its read buffer size in case it’s too small to fit a single large directory entry, or skip the oversized directory entry.
  • Atomically replace a file descriptor by renumbering another file descriptor. Due to the strong focus on thread safety, this environment does not provide a mechanism to duplicate or renumber a file descriptor to an arbitrary number, like dup2(). This would be prone to race conditions, as an actual file descriptor with the same number could be allocated by a different thread at the same time. This function provides a way to atomically renumber file descriptors, which would disappear if dup2() were to be removed entirely.
  • Move the offset of a file descriptor. Note: This is similar to lseek in POSIX.
  • Synchronize the data and metadata of a file to disk. Note: This is similar to fsync in POSIX.
  • Return the current offset of a file descriptor. Note: This is similar to lseek(fd, 0, SEEK_CUR) in POSIX.
  • Write to a file descriptor. Note: This is similar to writev in POSIX.
  • Wait for a futex_wake operation to wake us.
  • Wake up one thread that’s blocked on futex_wait on this futex.
  • Wake up all threads that are waiting on futex_wait on this futex.
  • Returns the current working directory
  • Makes a HTTP request to a remote web resource and returns a socket handles that are used to send and receive data
  • Retrieves the status of a HTTP request
  • Create a directory. Note: This is similar to mkdirat in POSIX.
  • Return the attributes of a file or directory. Note: This is similar to stat in POSIX.
  • Adjust the timestamps of a file or directory. Note: This is similar to utimensat in POSIX.
  • Create a hard link. Note: This is similar to linkat in POSIX.
  • Open a file or directory. The returned file descriptor is not guaranteed to be the lowest-numbered file descriptor not currently open; it is randomized to prevent applications from depending on making assumptions about indexes, since this is error-prone in multi-threaded contexts. The returned file descriptor is guaranteed to be less than 2**31. Note: This is similar to openat in POSIX.
  • Read the contents of a symbolic link. Note: This is similar to readlinkat in POSIX.
  • Remove a directory. Return errno::notempty if the directory is not empty. Note: This is similar to unlinkat(fd, path, AT_REMOVEDIR) in POSIX.
  • Rename a file or directory. Note: This is similar to renameat in POSIX.
  • Create a symbolic link. Note: This is similar to symlinkat in POSIX.
  • Unlink a file. Return errno::isdir if the path refers to a directory. Note: This is similar to unlinkat(fd, path, 0) in POSIX.
  • Concurrently poll for the occurrence of a set of events.
  • Adds another static address to the local port
  • Clears all the addresses on the local port
  • Returns a list of all the addresses owned by the local port
  • Removes an address from the local port
  • Securely connects to a particular remote network
  • Acquires a set of addresses using DHCP
  • Adds a default gateway to the local port
  • Returns the MAC address of the local port
  • Adds a new route to the local port
  • Clears all the routes in the local port
  • Returns a list of all the routes owned by the local port This function fills the output buffer as much as possible. If the buffer is too small this will return EOVERFLOW and fill nroutes with the size of the buffer needed.
  • Removes an existing route from the local port
  • Disconnects from a remote network
  • execve() executes the program referred to by pathname. This causes the program that is currently being run by the calling process to be replaced with a new program, with newly initialized stack, heap, and (initialized and uninitialized) data segments
  • Terminate the process normally. An exit code of 0 indicates successful termination of the program. The meanings of other values is dependent on the environment.
  • Forks the current process into a new subprocess. If the function returns a zero then its the new subprocess. If it returns a positive number then its the current process and the $pid represents the child.
  • Returns the handle of the current process
  • Wait for process to exit
  • Returns the parent handle of a particular process
  • Send a signal to the process of the calling thread. Note: This is similar to raise in POSIX.
  • Send a signal to the process of the calling thread on a regular basis Note: This is similar to setitimer in POSIX.
  • Sends a signal to another process
  • Spawns a new process within the context of the parent process (i.e. this process). It inherits the filesystem and sandbox permissions but runs standalone.
  • Write high-quality random data into a buffer. This function blocks when the implementation is unable to immediately provide sufficient high-quality random data. This function may execute slowly, so when large mounts of random data are required, it’s advisable to use this function to seed a pseudo-random number generator, rather than to provide the random data directly.
  • Resolves a hostname and a port to one or more IP addresses.
  • Temporarily yield execution of the calling thread. Note: This is similar to sched_yield in POSIX.
  • Accept a new incoming connection. Note: This is similar to accept in POSIX.
  • Accept a new incoming connection. Note: This is similar to accept in POSIX.
  • Returns the local address to which the socket is bound.
  • Returns the remote address to which the socket is connected to.
  • Bind a socket Note: This is similar to bind in POSIX using PF_INET
  • Initiate a connection on a socket to the specified address
  • Retrieve status of particular socket seting Note: This is similar to getsockopt in POSIX for SO_REUSEADDR
  • Retrieve the size of particular option for this socket Note: This is similar to getsockopt in POSIX for SO_RCVBUF
  • Retrieve one of the times on the socket
  • Joins a particular multicast IPv4 group
  • Joins a particular multicast IPv6 group
  • Leaves a particular multicast IPv4 group
  • Leaves a particular multicast IPv6 group
  • Listen for connections on a socket
  • Create an endpoint for communication.
  • Receive a message from a socket. Note: This is similar to recv in POSIX, though it also supports reading the data into multiple buffers in the manner of readv.
  • Receive a message and its peer address from a socket. Note: This is similar to recvfrom in POSIX, though it also supports reading the data into multiple buffers in the manner of readv.
  • Send a message on a socket. Note: This is similar to send in POSIX, though it also supports writing the data from multiple buffers in the manner of writev.
  • Sends the entire contents of a file down a socket
  • Send a message on a socket to a specific address. Note: This is similar to sendto in POSIX, though it also supports writing the data from multiple buffers in the manner of writev.
  • Sets a particular socket setting Note: This is similar to setsockopt in POSIX for SO_REUSEADDR
  • Set size of particular option for this socket Note: This is similar to setsockopt in POSIX for SO_RCVBUF
  • Sets one of the times the socket
  • Shut down socket send and receive channels. Note: This is similar to shutdown in POSIX.
  • Returns the current status of a socket
  • Creates a checkpoint of the current stack which allows it to be restored later using its stack hash. The value supplied will be returned upon restoration (and hence must be none zero) - zero will be returned when the stack is first recorded.
  • Restores the current stack to a previous stack described by supplying stack snapshot.
  • Terminates the current running thread, if this is the last thread then the process will also exit with the specified exit code. An exit code of 0 indicates successful termination of the thread. The meanings of other values is dependent on the environment.
  • Returns the index of the current thread (threads indices are sequential from zero while the main thread ID equals the process ID)
  • Joins this thread with another thread, blocking this one until the other finishes
  • Returns the available parallelism which is normally the number of available cores that can run concurrently
  • Sends a signal to a specific thread
  • Sends the current thread to sleep for a period of time
  • Creates a new thread by spawning that shares the same memory address space, file handles and main event loops. The web assembly process must export function named ‘wasi_thread_start’
  • Retrieves the current state of the TTY
  • Updates the properties of the the TTY
  • Connects to a websocket at a particular network URL

Type Definitions

Unions