[][src]Module wasihost_core::wasi_snapshot_preview1::native

Native WASI types. These types can be written to and read from WASM memory.

Structs

ciovec

A region of memory for scatter/gather writes.

dirent

A directory entry.

event

An event that occurred.

event_fd_readwrite

The contents of an $event when type is eventtype::fd_read or eventtype::fd_write.

fdstat

File descriptor attributes.

filestat

File attributes.

iovec

A region of memory for scatter/gather reads.

prestat_dir

The contents of a $prestat when type is preopentype::dir.

subscription

Subscription to an event.

subscription_clock

The contents of a subscription when type is eventtype::clock.

subscription_fd_readwrite

The contents of a subscription when type is type is eventtype::fd_read or eventtype::fd_write.

Enums

prestat

Information about a pre-opened capability.

subscription_u

The contents of a subscription.

Constants

advice_dontneed

The application expects that it will not access the specified data in the near future.

advice_noreuse

The application expects to access the specified data once and then not reuse it thereafter.

advice_normal

The application has no advice to give on its behavior with respect to the specified data.

advice_random

The application expects to access the specified data in a random order.

advice_sequential

The application expects to access the specified data sequentially from lower offsets to higher offsets.

advice_willneed

The application expects to access the specified data in the near future.

clockid_monotonic

The store-wide monotonic clock, which is defined as a clock measuring real time, whose value cannot be adjusted and which cannot have negative clock jumps. The epoch of this clock is undefined. The absolute time value of this clock therefore has no meaning.

clockid_process_cputime_id

The CPU-time clock associated with the current process.

clockid_realtime

The clock measuring real time. Time value zero corresponds with 1970-01-01T00:00:00Z.

clockid_thread_cputime_id

The CPU-time clock associated with the current thread.

errno_2big

Argument list too long.

errno_acces

Permission denied.

errno_addrinuse

Address in use.

errno_addrnotavail

Address not available.

errno_afnosupport

Address family not supported.

errno_again

Resource unavailable, or operation would block.

errno_already

Connection already in progress.

errno_badf

Bad file descriptor.

errno_badmsg

Bad message.

errno_busy

Device or resource busy.

errno_canceled

Operation canceled.

errno_child

No child processes.

errno_connaborted

Connection aborted.

errno_connrefused

Connection refused.

errno_connreset

Connection reset.

errno_deadlk

Resource deadlock would occur.

errno_destaddrreq

Destination address required.

errno_dom

Mathematics argument out of domain of function.

errno_dquot

Reserved.

errno_exist

File exists.

errno_fault

Bad address.

errno_fbig

File too large.

errno_hostunreach

Host is unreachable.

errno_idrm

Identifier removed.

errno_ilseq

Illegal byte sequence.

errno_inprogress

Operation in progress.

errno_intr

Interrupted function.

errno_inval

Invalid argument.

errno_io

I/O error.

errno_isconn

Socket is connected.

errno_isdir

Is a directory.

errno_loop

Too many levels of symbolic links.

errno_mfile

File descriptor value too large.

errno_mlink

Too many links.

errno_msgsize

Message too large.

errno_multihop

Reserved.

errno_nametoolong

Filename too long.

errno_netdown

Network is down.

errno_netreset

Connection aborted by network.

errno_netunreach

Network unreachable.

errno_nfile

Too many files open in system.

errno_nobufs

No buffer space available.

errno_nodev

No such device.

errno_noent

No such file or directory.

errno_noexec

Executable file format error.

errno_nolck

No locks available.

errno_nolink

Reserved.

errno_nomem

Not enough space.

errno_nomsg

No message of the desired type.

errno_noprotoopt

Protocol not available.

errno_nospc

No space left on device.

errno_nosys

Function not supported.

errno_notcapable

Extension: Capabilities insufficient.

errno_notconn

The socket is not connected.

errno_notdir

Not a directory or a symbolic link to a directory.

errno_notempty

Directory not empty.

errno_notrecoverable

State not recoverable.

errno_notsock

Not a socket.

errno_notsup

Not supported, or operation not supported on socket.

errno_notty

Inappropriate I/O control operation.

errno_nxio

No such device or address.

errno_overflow

Value too large to be stored in data type.

errno_ownerdead

Previous owner died.

errno_perm

Operation not permitted.

errno_pipe

Broken pipe.

errno_proto

Protocol error.

errno_protonosupport

Protocol not supported.

errno_prototype

Protocol wrong type for socket.

errno_range

Result too large.

errno_rofs

Read-only file system.

errno_spipe

Invalid seek.

errno_srch

No such process.

errno_stale

Reserved.

errno_success

No error occurred. System call completed successfully.

errno_timedout

Connection timed out.

errno_txtbsy

Text file busy.

errno_xdev

Cross-device link.

eventrwflags_fd_readwrite_hangup

The peer of this socket has closed or disconnected.

eventtype_clock

The time value of clock subscription_clock::id has reached timestamp subscription_clock::timeout.

eventtype_fd_read

File descriptor subscription_fd_readwrite::file_descriptor has data available for reading. This event always triggers for regular files.

eventtype_fd_write

File descriptor subscription_fd_readwrite::file_descriptor has capacity available for writing. This event always triggers for regular files.

fdflags_append

Append mode: Data written to the file is always appended to the file's end.

fdflags_dsync

Write according to synchronized I/O data integrity completion. Only the data stored in the file is synchronized.

fdflags_nonblock

Non-blocking mode.

fdflags_rsync

Synchronized read I/O operations.

fdflags_sync

Write according to synchronized I/O file integrity completion. In addition to synchronizing the data stored in the file, the implementation may also synchronously update the file's metadata.

filetype_block_device

The file descriptor or file refers to a block device inode.

filetype_character_device

The file descriptor or file refers to a character device inode.

filetype_directory

The file descriptor or file refers to a directory inode.

filetype_regular_file

The file descriptor or file refers to a regular file inode.

filetype_socket_dgram

The file descriptor or file refers to a datagram socket.

filetype_socket_stream

The file descriptor or file refers to a byte-stream socket.

filetype_symbolic_link

The file refers to a symbolic link inode.

filetype_unknown

The type of the file descriptor or file is unknown or is different from any of the other types specified.

fstflags_atim

Adjust the last data access timestamp to the value stored in filestat::atim.

fstflags_atim_now

Adjust the last data access timestamp to the time of clock clockid::realtime.

fstflags_mtim

Adjust the last data modification timestamp to the value stored in filestat::mtim.

fstflags_mtim_now

Adjust the last data modification timestamp to the time of clock clockid::realtime.

lookupflags_symlink_follow

As long as the resolved path corresponds to a symbolic link, it is expanded.

oflags_creat

Create file if it does not exist.

oflags_directory

Fail if not a directory.

oflags_excl

Fail if file already exists.

oflags_trunc

Truncate file to size 0.

preopentype_dir

A pre-opened directory.

riflags_recv_peek

Returns the message without removing it from the socket's receive queue.

riflags_recv_waitall

On byte-stream sockets, block until the full amount of data can be returned.

rights_fd_advise

The right to invoke fd_advise.

rights_fd_allocate

The right to invoke fd_allocate.

rights_fd_datasync

The right to invoke fd_datasync. If path_open is set, includes the right to invoke path_open with fdflags::dsync.

rights_fd_fdstat_set_flags

The right to invoke fd_fdstat_set_flags.

rights_fd_filestat_get

The right to invoke fd_filestat_get.

rights_fd_filestat_set_size

The right to invoke fd_filestat_set_size.

rights_fd_filestat_set_times

The right to invoke fd_filestat_set_times.

rights_fd_read

The right to invoke fd_read and sock_recv. If rights::fd_seek is set, includes the right to invoke fd_pread.

rights_fd_readdir

The right to invoke fd_readdir.

rights_fd_seek

The right to invoke fd_seek. This flag implies rights::fd_tell.

rights_fd_sync

The right to invoke fd_sync. If path_open is set, includes the right to invoke path_open with fdflags::rsync and fdflags::dsync.

rights_fd_tell

The right to invoke fd_seek in such a way that the file offset remains unaltered (i.e., whence::cur with offset zero), or to invoke fd_tell.

rights_fd_write

The right to invoke fd_write and sock_send. If rights::fd_seek is set, includes the right to invoke fd_pwrite.

rights_path_create_directory

The right to invoke path_create_directory.

rights_path_create_file

If path_open is set, the right to invoke path_open with oflags::creat.

rights_path_filestat_get

The right to invoke path_filestat_get.

rights_path_filestat_set_size

The right to change a file's size (there is no path_filestat_set_size). If path_open is set, includes the right to invoke path_open with oflags::trunc.

rights_path_filestat_set_times

The right to invoke path_filestat_set_times.

rights_path_link_source

The right to invoke path_link with the file descriptor as the source directory.

rights_path_link_target

The right to invoke path_link with the file descriptor as the target directory.

rights_path_open

The right to invoke path_open.

rights_path_readlink

The right to invoke path_readlink.

rights_path_remove_directory

The right to invoke path_remove_directory.

rights_path_rename_source

The right to invoke path_rename with the file descriptor as the source directory.

rights_path_rename_target

The right to invoke path_rename with the file descriptor as the target directory.

rights_path_symlink

The right to invoke path_symlink.

rights_path_unlink_file

The right to invoke path_unlink_file.

rights_poll_fd_readwrite

If rights::fd_read is set, includes the right to invoke poll_oneoff to subscribe to eventtype::fd_read. If rights::fd_write is set, includes the right to invoke poll_oneoff to subscribe to eventtype::fd_write.

rights_sock_shutdown

The right to invoke sock_shutdown.

roflags_recv_data_truncated

Returned by sock_recv: Message data has been truncated.

sdflags_rd

Disables further receive operations.

sdflags_wr

Disables further send operations.

signal_abrt

Process abort signal. Action: Terminates the process.

signal_alrm

Alarm clock. Action: Terminates the process.

signal_bus

Access to an undefined portion of a memory object. Action: Terminates the process.

signal_chld

Child process terminated, stopped, or continued. Action: Ignored.

signal_cont

Continue executing, if stopped. Action: Continues executing, if stopped.

signal_fpe

Erroneous arithmetic operation. Action: Terminates the process.

signal_hup

Hangup. Action: Terminates the process.

signal_ill

Illegal instruction. Action: Terminates the process.

signal_int

Terminate interrupt signal. Action: Terminates the process.

signal_kill

Kill. Action: Terminates the process.

signal_none

No signal. Note that POSIX has special semantics for kill(pid, 0), so this value is reserved.

signal_pipe

Write on a pipe with no one to read it. Action: Ignored.

signal_poll

I/O possible. Action: Terminates the process.

signal_prof

Profiling timer expired. Action: Terminates the process.

signal_pwr

Power failure. Action: Terminates the process.

signal_quit

Terminal quit signal. Action: Terminates the process.

signal_segv

Invalid memory reference. Action: Terminates the process.

signal_stop

Stop executing. Action: Stops executing.

signal_sys

Bad system call. Action: Terminates the process.

signal_term

Termination signal. Action: Terminates the process.

signal_trap

Trace/breakpoint trap. Action: Terminates the process.

signal_tstp

Terminal stop signal. Action: Stops executing.

signal_ttin

Background process attempting read. Action: Stops executing.

signal_ttou

Background process attempting write. Action: Stops executing.

signal_urg

High bandwidth data is available at a socket. Action: Ignored.

signal_usr1

User-defined signal 1. Action: Terminates the process.

signal_usr2

User-defined signal 2. Action: Terminates the process.

signal_vtalrm

Virtual timer expired. Action: Terminates the process.

signal_winch

Window changed. Action: Ignored.

signal_xcpu

CPU time limit exceeded. Action: Terminates the process.

signal_xfsz

File size limit exceeded. Action: Terminates the process.

subclockflags_subscription_clock_abstime

If set, treat the timestamp provided in subscription_clock::timeout as an absolute timestamp of clock subscription_clock::id. If clear, treat the timestamp provided in subscription_clock::timeout relative to the current time value of clock subscription_clock::id.

whence_cur

Seek relative to current position.

whence_end

Seek relative to end-of-file.

whence_set

Seek relative to start-of-file.

Traits

NativeWasiImports

Functions necessary to satisfy the WASI specification.

NativeWasiImportsExt

Extension methods for the NativeWasiImports trait.

Type Definitions

advice

File or memory access pattern advisory information.

clockid

Identifiers for clocks.

device

Identifier for a device containing a file system. Can be used in combination with inode to uniquely identify a file or directory in the filesystem.

dircookie

A reference to the offset of a directory entry.

dirnamlen

The type for the $d_namlen field of $dirent.

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.

eventrwflags

The state of the file descriptor subscribed to with eventtype::fd_read or eventtype::fd_write.

eventtype

Type of a subscription to an event or its occurrence.

exitcode

Exit code generated by a process when exiting.

fd

A file descriptor handle.

fdflags

File descriptor flags.

filedelta

Relative offset within a file.

filesize

Non-negative file size or length of a region within a file.

filetype

The type of a file descriptor or file.

fstflags

Which file time attributes to adjust.

inode

File serial number that is unique within its file system.

linkcount

Number of hard links to an inode.

lookupflags

Flags determining the method of how paths are resolved.

oflags

Open flags used by path_open.

preopentype

Identifiers for preopened capabilities.

riflags

Flags provided to sock_recv.

rights

File descriptor rights, determining which actions may be performed.

roflags

Flags returned by sock_recv.

sdflags

Which channels on a socket to shut down.

siflags

Flags provided to sock_send. As there are currently no flags defined, it must be set to zero.

signal

Signal condition.

size
subclockflags

Flags determining how to interpret the timestamp provided in subscription_clock::timeout.

timestamp

Timestamp in nanoseconds.

userdata

User-provided value that may be attached to objects that is retained when extracted from the implementation.

whence

The position relative to which to set the offset of the file descriptor.