| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| #ifndef __wasi_api_h |
| #define __wasi_api_h |
|
|
| #include <stddef.h> |
| #include <stdint.h> |
|
|
| #pragma push_macro("_Static_assert") |
| #undef _Static_assert |
| #define _Static_assert(X, Y) |
|
|
| _Static_assert(_Alignof(int8_t) == 1, "non-wasi data layout"); |
| _Static_assert(_Alignof(uint8_t) == 1, "non-wasi data layout"); |
| _Static_assert(_Alignof(int16_t) == 2, "non-wasi data layout"); |
| _Static_assert(_Alignof(uint16_t) == 2, "non-wasi data layout"); |
| _Static_assert(_Alignof(int32_t) == 4, "non-wasi data layout"); |
| _Static_assert(_Alignof(uint32_t) == 4, "non-wasi data layout"); |
| _Static_assert(_Alignof(int64_t) == 8, "non-wasi data layout"); |
| _Static_assert(_Alignof(uint64_t) == 8, "non-wasi data layout"); |
| _Static_assert(_Alignof(void*) == 4, "non-wasi data layout"); |
|
|
| #ifdef __cplusplus |
| extern "C" { |
| #endif |
|
|
| |
| #define __WASI_DIRCOOKIE_START (UINT64_C(0)) |
| typedef __SIZE_TYPE__ __wasi_size_t; |
|
|
| _Static_assert(sizeof(__wasi_size_t) == 4, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_size_t) == 4, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint64_t __wasi_filesize_t; |
|
|
| _Static_assert(sizeof(__wasi_filesize_t) == 8, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_filesize_t) == 8, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint64_t __wasi_timestamp_t; |
|
|
| _Static_assert(sizeof(__wasi_timestamp_t) == 8, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_timestamp_t) == 8, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint32_t __wasi_clockid_t; |
|
|
| |
| |
| |
| |
| #define __WASI_CLOCKID_REALTIME (UINT32_C(0)) |
|
|
| |
| |
| |
| |
| |
| |
| #define __WASI_CLOCKID_MONOTONIC (UINT32_C(1)) |
|
|
| |
| |
| |
| #define __WASI_CLOCKID_PROCESS_CPUTIME_ID (UINT32_C(2)) |
|
|
| |
| |
| |
| #define __WASI_CLOCKID_THREAD_CPUTIME_ID (UINT32_C(3)) |
|
|
| _Static_assert(sizeof(__wasi_clockid_t) == 4, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_clockid_t) == 4, "witx calculated align"); |
|
|
| |
| |
| |
| |
| |
| |
| typedef uint16_t __wasi_errno_t; |
|
|
| |
| |
| |
| #define __WASI_ERRNO_SUCCESS (UINT16_C(0)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_2BIG (UINT16_C(1)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_ACCES (UINT16_C(2)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_ADDRINUSE (UINT16_C(3)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_ADDRNOTAVAIL (UINT16_C(4)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_AFNOSUPPORT (UINT16_C(5)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_AGAIN (UINT16_C(6)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_ALREADY (UINT16_C(7)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_BADF (UINT16_C(8)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_BADMSG (UINT16_C(9)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_BUSY (UINT16_C(10)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_CANCELED (UINT16_C(11)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_CHILD (UINT16_C(12)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_CONNABORTED (UINT16_C(13)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_CONNREFUSED (UINT16_C(14)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_CONNRESET (UINT16_C(15)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_DEADLK (UINT16_C(16)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_DESTADDRREQ (UINT16_C(17)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_DOM (UINT16_C(18)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_DQUOT (UINT16_C(19)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_EXIST (UINT16_C(20)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_FAULT (UINT16_C(21)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_FBIG (UINT16_C(22)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_HOSTUNREACH (UINT16_C(23)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_IDRM (UINT16_C(24)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_ILSEQ (UINT16_C(25)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_INPROGRESS (UINT16_C(26)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_INTR (UINT16_C(27)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_INVAL (UINT16_C(28)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_IO (UINT16_C(29)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_ISCONN (UINT16_C(30)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_ISDIR (UINT16_C(31)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_LOOP (UINT16_C(32)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_MFILE (UINT16_C(33)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_MLINK (UINT16_C(34)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_MSGSIZE (UINT16_C(35)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_MULTIHOP (UINT16_C(36)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NAMETOOLONG (UINT16_C(37)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NETDOWN (UINT16_C(38)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NETRESET (UINT16_C(39)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NETUNREACH (UINT16_C(40)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NFILE (UINT16_C(41)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOBUFS (UINT16_C(42)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NODEV (UINT16_C(43)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOENT (UINT16_C(44)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOEXEC (UINT16_C(45)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOLCK (UINT16_C(46)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOLINK (UINT16_C(47)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOMEM (UINT16_C(48)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOMSG (UINT16_C(49)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOPROTOOPT (UINT16_C(50)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOSPC (UINT16_C(51)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOSYS (UINT16_C(52)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOTCONN (UINT16_C(53)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOTDIR (UINT16_C(54)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOTEMPTY (UINT16_C(55)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOTRECOVERABLE (UINT16_C(56)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOTSOCK (UINT16_C(57)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOTSUP (UINT16_C(58)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOTTY (UINT16_C(59)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NXIO (UINT16_C(60)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_OVERFLOW (UINT16_C(61)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_OWNERDEAD (UINT16_C(62)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_PERM (UINT16_C(63)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_PIPE (UINT16_C(64)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_PROTO (UINT16_C(65)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_PROTONOSUPPORT (UINT16_C(66)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_PROTOTYPE (UINT16_C(67)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_RANGE (UINT16_C(68)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_ROFS (UINT16_C(69)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_SPIPE (UINT16_C(70)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_SRCH (UINT16_C(71)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_STALE (UINT16_C(72)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_TIMEDOUT (UINT16_C(73)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_TXTBSY (UINT16_C(74)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_XDEV (UINT16_C(75)) |
|
|
| |
| |
| |
| #define __WASI_ERRNO_NOTCAPABLE (UINT16_C(76)) |
|
|
| _Static_assert(sizeof(__wasi_errno_t) == 2, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_errno_t) == 2, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint64_t __wasi_rights_t; |
|
|
| |
| |
| |
| |
| |
| #define __WASI_RIGHTS_FD_DATASYNC (UINT64_C(1)) |
|
|
| |
| |
| |
| |
| #define __WASI_RIGHTS_FD_READ (UINT64_C(2)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_FD_SEEK (UINT64_C(4)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS (UINT64_C(8)) |
|
|
| |
| |
| |
| |
| |
| #define __WASI_RIGHTS_FD_SYNC (UINT64_C(16)) |
|
|
| |
| |
| |
| |
| |
| #define __WASI_RIGHTS_FD_TELL (UINT64_C(32)) |
|
|
| |
| |
| |
| |
| #define __WASI_RIGHTS_FD_WRITE (UINT64_C(64)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_FD_ADVISE (UINT64_C(128)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_FD_ALLOCATE (UINT64_C(256)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_PATH_CREATE_DIRECTORY (UINT64_C(512)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_PATH_CREATE_FILE (UINT64_C(1024)) |
|
|
| |
| |
| |
| |
| #define __WASI_RIGHTS_PATH_LINK_SOURCE (UINT64_C(2048)) |
|
|
| |
| |
| |
| |
| #define __WASI_RIGHTS_PATH_LINK_TARGET (UINT64_C(4096)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_PATH_OPEN (UINT64_C(8192)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_FD_READDIR (UINT64_C(16384)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_PATH_READLINK (UINT64_C(32768)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_PATH_RENAME_SOURCE (UINT64_C(65536)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_PATH_RENAME_TARGET (UINT64_C(131072)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_PATH_FILESTAT_GET (UINT64_C(262144)) |
|
|
| |
| |
| |
| |
| #define __WASI_RIGHTS_PATH_FILESTAT_SET_SIZE (UINT64_C(524288)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_PATH_FILESTAT_SET_TIMES (UINT64_C(1048576)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_FD_FILESTAT_GET (UINT64_C(2097152)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_FD_FILESTAT_SET_SIZE (UINT64_C(4194304)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_FD_FILESTAT_SET_TIMES (UINT64_C(8388608)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_PATH_SYMLINK (UINT64_C(16777216)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_PATH_REMOVE_DIRECTORY (UINT64_C(33554432)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_PATH_UNLINK_FILE (UINT64_C(67108864)) |
|
|
| |
| |
| |
| |
| #define __WASI_RIGHTS_POLL_FD_READWRITE (UINT64_C(134217728)) |
|
|
| |
| |
| |
| #define __WASI_RIGHTS_SOCK_SHUTDOWN (UINT64_C(268435456)) |
|
|
| _Static_assert(sizeof(__wasi_rights_t) == 8, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_rights_t) == 8, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint32_t __wasi_fd_t; |
|
|
| _Static_assert(sizeof(__wasi_fd_t) == 4, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_fd_t) == 4, "witx calculated align"); |
|
|
| |
| |
| |
| typedef struct __wasi_iovec_t { |
| |
| |
| |
| uint8_t * buf; |
|
|
| |
| |
| |
| __wasi_size_t buf_len; |
|
|
| } __wasi_iovec_t; |
|
|
| _Static_assert(sizeof(__wasi_iovec_t) == 8, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_iovec_t) == 4, "witx calculated align"); |
| _Static_assert(offsetof(__wasi_iovec_t, buf) == 0, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_iovec_t, buf_len) == 4, "witx calculated offset"); |
|
|
| |
| |
| |
| typedef struct __wasi_ciovec_t { |
| |
| |
| |
| const uint8_t * buf; |
|
|
| |
| |
| |
| __wasi_size_t buf_len; |
|
|
| } __wasi_ciovec_t; |
|
|
| _Static_assert(sizeof(__wasi_ciovec_t) == 8, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_ciovec_t) == 4, "witx calculated align"); |
| _Static_assert(offsetof(__wasi_ciovec_t, buf) == 0, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_ciovec_t, buf_len) == 4, "witx calculated offset"); |
|
|
| |
| |
| |
| typedef int64_t __wasi_filedelta_t; |
|
|
| _Static_assert(sizeof(__wasi_filedelta_t) == 8, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_filedelta_t) == 8, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint8_t __wasi_whence_t; |
|
|
| |
| |
| |
| #define __WASI_WHENCE_SET (UINT8_C(0)) |
|
|
| |
| |
| |
| #define __WASI_WHENCE_CUR (UINT8_C(1)) |
|
|
| |
| |
| |
| #define __WASI_WHENCE_END (UINT8_C(2)) |
|
|
| _Static_assert(sizeof(__wasi_whence_t) == 1, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_whence_t) == 1, "witx calculated align"); |
|
|
| |
| |
| |
| |
| |
| typedef uint64_t __wasi_dircookie_t; |
|
|
| _Static_assert(sizeof(__wasi_dircookie_t) == 8, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_dircookie_t) == 8, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint32_t __wasi_dirnamlen_t; |
|
|
| _Static_assert(sizeof(__wasi_dirnamlen_t) == 4, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_dirnamlen_t) == 4, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint64_t __wasi_inode_t; |
|
|
| _Static_assert(sizeof(__wasi_inode_t) == 8, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_inode_t) == 8, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint8_t __wasi_filetype_t; |
|
|
| |
| |
| |
| #define __WASI_FILETYPE_UNKNOWN (UINT8_C(0)) |
|
|
| |
| |
| |
| #define __WASI_FILETYPE_BLOCK_DEVICE (UINT8_C(1)) |
|
|
| |
| |
| |
| #define __WASI_FILETYPE_CHARACTER_DEVICE (UINT8_C(2)) |
|
|
| |
| |
| |
| #define __WASI_FILETYPE_DIRECTORY (UINT8_C(3)) |
|
|
| |
| |
| |
| #define __WASI_FILETYPE_REGULAR_FILE (UINT8_C(4)) |
|
|
| |
| |
| |
| #define __WASI_FILETYPE_SOCKET_DGRAM (UINT8_C(5)) |
|
|
| |
| |
| |
| #define __WASI_FILETYPE_SOCKET_STREAM (UINT8_C(6)) |
|
|
| |
| |
| |
| #define __WASI_FILETYPE_SYMBOLIC_LINK (UINT8_C(7)) |
|
|
| _Static_assert(sizeof(__wasi_filetype_t) == 1, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_filetype_t) == 1, "witx calculated align"); |
|
|
| |
| |
| |
| typedef struct __wasi_dirent_t { |
| |
| |
| |
| __wasi_dircookie_t d_next; |
|
|
| |
| |
| |
| __wasi_inode_t d_ino; |
|
|
| |
| |
| |
| __wasi_dirnamlen_t d_namlen; |
|
|
| |
| |
| |
| __wasi_filetype_t d_type; |
|
|
| } __wasi_dirent_t; |
|
|
| _Static_assert(sizeof(__wasi_dirent_t) == 24, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_dirent_t) == 8, "witx calculated align"); |
| _Static_assert(offsetof(__wasi_dirent_t, d_next) == 0, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_dirent_t, d_ino) == 8, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_dirent_t, d_namlen) == 16, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_dirent_t, d_type) == 20, "witx calculated offset"); |
|
|
| |
| |
| |
| typedef uint8_t __wasi_advice_t; |
|
|
| |
| |
| |
| #define __WASI_ADVICE_NORMAL (UINT8_C(0)) |
|
|
| |
| |
| |
| #define __WASI_ADVICE_SEQUENTIAL (UINT8_C(1)) |
|
|
| |
| |
| |
| #define __WASI_ADVICE_RANDOM (UINT8_C(2)) |
|
|
| |
| |
| |
| #define __WASI_ADVICE_WILLNEED (UINT8_C(3)) |
|
|
| |
| |
| |
| #define __WASI_ADVICE_DONTNEED (UINT8_C(4)) |
|
|
| |
| |
| |
| #define __WASI_ADVICE_NOREUSE (UINT8_C(5)) |
|
|
| _Static_assert(sizeof(__wasi_advice_t) == 1, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_advice_t) == 1, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint16_t __wasi_fdflags_t; |
|
|
| |
| |
| |
| #define __WASI_FDFLAGS_APPEND (UINT16_C(1)) |
|
|
| |
| |
| |
| #define __WASI_FDFLAGS_DSYNC (UINT16_C(2)) |
|
|
| |
| |
| |
| #define __WASI_FDFLAGS_NONBLOCK (UINT16_C(4)) |
|
|
| |
| |
| |
| #define __WASI_FDFLAGS_RSYNC (UINT16_C(8)) |
|
|
| |
| |
| |
| |
| |
| #define __WASI_FDFLAGS_SYNC (UINT16_C(16)) |
|
|
| _Static_assert(sizeof(__wasi_fdflags_t) == 2, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_fdflags_t) == 2, "witx calculated align"); |
|
|
| |
| |
| |
| typedef struct __wasi_fdstat_t { |
| |
| |
| |
| __wasi_filetype_t fs_filetype; |
|
|
| |
| |
| |
| __wasi_fdflags_t fs_flags; |
|
|
| |
| |
| |
| __wasi_rights_t fs_rights_base; |
|
|
| |
| |
| |
| |
| __wasi_rights_t fs_rights_inheriting; |
|
|
| } __wasi_fdstat_t; |
|
|
| _Static_assert(sizeof(__wasi_fdstat_t) == 24, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_fdstat_t) == 8, "witx calculated align"); |
| _Static_assert(offsetof(__wasi_fdstat_t, fs_filetype) == 0, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_fdstat_t, fs_flags) == 2, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_fdstat_t, fs_rights_base) == 8, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_fdstat_t, fs_rights_inheriting) == 16, "witx calculated offset"); |
|
|
| |
| |
| |
| |
| typedef uint64_t __wasi_device_t; |
|
|
| _Static_assert(sizeof(__wasi_device_t) == 8, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_device_t) == 8, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint16_t __wasi_fstflags_t; |
|
|
| |
| |
| |
| #define __WASI_FSTFLAGS_ATIM (UINT16_C(1)) |
|
|
| |
| |
| |
| #define __WASI_FSTFLAGS_ATIM_NOW (UINT16_C(2)) |
|
|
| |
| |
| |
| #define __WASI_FSTFLAGS_MTIM (UINT16_C(4)) |
|
|
| |
| |
| |
| #define __WASI_FSTFLAGS_MTIM_NOW (UINT16_C(8)) |
|
|
| _Static_assert(sizeof(__wasi_fstflags_t) == 2, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_fstflags_t) == 2, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint32_t __wasi_lookupflags_t; |
|
|
| |
| |
| |
| #define __WASI_LOOKUPFLAGS_SYMLINK_FOLLOW (UINT32_C(1)) |
|
|
| _Static_assert(sizeof(__wasi_lookupflags_t) == 4, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_lookupflags_t) == 4, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint16_t __wasi_oflags_t; |
|
|
| |
| |
| |
| #define __WASI_OFLAGS_CREAT (UINT16_C(1)) |
|
|
| |
| |
| |
| #define __WASI_OFLAGS_DIRECTORY (UINT16_C(2)) |
|
|
| |
| |
| |
| #define __WASI_OFLAGS_EXCL (UINT16_C(4)) |
|
|
| |
| |
| |
| #define __WASI_OFLAGS_TRUNC (UINT16_C(8)) |
|
|
| _Static_assert(sizeof(__wasi_oflags_t) == 2, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_oflags_t) == 2, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint64_t __wasi_linkcount_t; |
|
|
| _Static_assert(sizeof(__wasi_linkcount_t) == 8, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_linkcount_t) == 8, "witx calculated align"); |
|
|
| |
| |
| |
| typedef struct __wasi_filestat_t { |
| |
| |
| |
| __wasi_device_t dev; |
|
|
| |
| |
| |
| __wasi_inode_t ino; |
|
|
| |
| |
| |
| __wasi_filetype_t filetype; |
|
|
| |
| |
| |
| __wasi_linkcount_t nlink; |
|
|
| |
| |
| |
| __wasi_filesize_t size; |
|
|
| |
| |
| |
| __wasi_timestamp_t atim; |
|
|
| |
| |
| |
| __wasi_timestamp_t mtim; |
|
|
| |
| |
| |
| __wasi_timestamp_t ctim; |
|
|
| } __wasi_filestat_t; |
|
|
| _Static_assert(sizeof(__wasi_filestat_t) == 64, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_filestat_t) == 8, "witx calculated align"); |
| _Static_assert(offsetof(__wasi_filestat_t, dev) == 0, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_filestat_t, ino) == 8, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_filestat_t, filetype) == 16, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_filestat_t, nlink) == 24, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_filestat_t, size) == 32, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_filestat_t, atim) == 40, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_filestat_t, mtim) == 48, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_filestat_t, ctim) == 56, "witx calculated offset"); |
|
|
| |
| |
| |
| |
| typedef uint64_t __wasi_userdata_t; |
|
|
| _Static_assert(sizeof(__wasi_userdata_t) == 8, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_userdata_t) == 8, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint8_t __wasi_eventtype_t; |
|
|
| |
| |
| |
| |
| #define __WASI_EVENTTYPE_CLOCK (UINT8_C(0)) |
|
|
| |
| |
| |
| |
| #define __WASI_EVENTTYPE_FD_READ (UINT8_C(1)) |
|
|
| |
| |
| |
| |
| #define __WASI_EVENTTYPE_FD_WRITE (UINT8_C(2)) |
|
|
| _Static_assert(sizeof(__wasi_eventtype_t) == 1, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_eventtype_t) == 1, "witx calculated align"); |
|
|
| |
| |
| |
| |
| typedef uint16_t __wasi_eventrwflags_t; |
|
|
| |
| |
| |
| #define __WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP (UINT16_C(1)) |
|
|
| _Static_assert(sizeof(__wasi_eventrwflags_t) == 2, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_eventrwflags_t) == 2, "witx calculated align"); |
|
|
| |
| |
| |
| |
| typedef struct __wasi_event_fd_readwrite_t { |
| |
| |
| |
| __wasi_filesize_t nbytes; |
|
|
| |
| |
| |
| __wasi_eventrwflags_t flags; |
|
|
| } __wasi_event_fd_readwrite_t; |
|
|
| _Static_assert(sizeof(__wasi_event_fd_readwrite_t) == 16, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_event_fd_readwrite_t) == 8, "witx calculated align"); |
| _Static_assert(offsetof(__wasi_event_fd_readwrite_t, nbytes) == 0, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_event_fd_readwrite_t, flags) == 8, "witx calculated offset"); |
|
|
| |
| |
| |
| typedef union __wasi_event_u_t { |
| |
| |
| |
| __wasi_event_fd_readwrite_t fd_readwrite; |
|
|
| } __wasi_event_u_t; |
|
|
| _Static_assert(sizeof(__wasi_event_u_t) == 16, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_event_u_t) == 8, "witx calculated align"); |
|
|
| |
| |
| |
| typedef struct __wasi_event_t { |
| |
| |
| |
| __wasi_userdata_t userdata; |
|
|
| |
| |
| |
| __wasi_errno_t error; |
|
|
| |
| |
| |
| __wasi_eventtype_t type; |
|
|
| |
| |
| |
| __wasi_event_u_t u; |
|
|
| } __wasi_event_t; |
|
|
| _Static_assert(sizeof(__wasi_event_t) == 32, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_event_t) == 8, "witx calculated align"); |
| _Static_assert(offsetof(__wasi_event_t, userdata) == 0, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_event_t, error) == 8, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_event_t, type) == 10, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_event_t, u) == 16, "witx calculated offset"); |
|
|
| |
| |
| |
| |
| typedef uint16_t __wasi_subclockflags_t; |
|
|
| |
| |
| |
| |
| |
| |
| |
| #define __WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME (UINT16_C(1)) |
|
|
| _Static_assert(sizeof(__wasi_subclockflags_t) == 2, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_subclockflags_t) == 2, "witx calculated align"); |
|
|
| |
| |
| |
| typedef struct __wasi_subscription_clock_t { |
| |
| |
| |
| __wasi_clockid_t id; |
|
|
| |
| |
| |
| __wasi_timestamp_t timeout; |
|
|
| |
| |
| |
| |
| __wasi_timestamp_t precision; |
|
|
| |
| |
| |
| __wasi_subclockflags_t flags; |
|
|
| } __wasi_subscription_clock_t; |
|
|
| _Static_assert(sizeof(__wasi_subscription_clock_t) == 32, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_subscription_clock_t) == 8, "witx calculated align"); |
| _Static_assert(offsetof(__wasi_subscription_clock_t, id) == 0, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_subscription_clock_t, timeout) == 8, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_subscription_clock_t, precision) == 16, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_subscription_clock_t, flags) == 24, "witx calculated offset"); |
|
|
| |
| |
| |
| |
| typedef struct __wasi_subscription_fd_readwrite_t { |
| |
| |
| |
| __wasi_fd_t file_descriptor; |
|
|
| } __wasi_subscription_fd_readwrite_t; |
|
|
| _Static_assert(sizeof(__wasi_subscription_fd_readwrite_t) == 4, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_subscription_fd_readwrite_t) == 4, "witx calculated align"); |
| _Static_assert(offsetof(__wasi_subscription_fd_readwrite_t, file_descriptor) == 0, "witx calculated offset"); |
|
|
| |
| |
| |
| typedef union __wasi_subscription_u_t { |
| |
| |
| |
| __wasi_subscription_clock_t clock; |
|
|
| |
| |
| |
| __wasi_subscription_fd_readwrite_t fd_readwrite; |
|
|
| } __wasi_subscription_u_t; |
|
|
| _Static_assert(sizeof(__wasi_subscription_u_t) == 32, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_subscription_u_t) == 8, "witx calculated align"); |
|
|
| |
| |
| |
| typedef struct __wasi_subscription_t { |
| |
| |
| |
| |
| __wasi_userdata_t userdata; |
|
|
| |
| |
| |
| __wasi_eventtype_t type; |
|
|
| |
| |
| |
| __wasi_subscription_u_t u; |
|
|
| } __wasi_subscription_t; |
|
|
| _Static_assert(sizeof(__wasi_subscription_t) == 48, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_subscription_t) == 8, "witx calculated align"); |
| _Static_assert(offsetof(__wasi_subscription_t, userdata) == 0, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_subscription_t, type) == 8, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_subscription_t, u) == 16, "witx calculated offset"); |
|
|
| |
| |
| |
| typedef uint32_t __wasi_exitcode_t; |
|
|
| _Static_assert(sizeof(__wasi_exitcode_t) == 4, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_exitcode_t) == 4, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint8_t __wasi_signal_t; |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_NONE (UINT8_C(0)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_HUP (UINT8_C(1)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_INT (UINT8_C(2)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_QUIT (UINT8_C(3)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_ILL (UINT8_C(4)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_TRAP (UINT8_C(5)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_ABRT (UINT8_C(6)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_BUS (UINT8_C(7)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_FPE (UINT8_C(8)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_KILL (UINT8_C(9)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_USR1 (UINT8_C(10)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_SEGV (UINT8_C(11)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_USR2 (UINT8_C(12)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_PIPE (UINT8_C(13)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_ALRM (UINT8_C(14)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_TERM (UINT8_C(15)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_CHLD (UINT8_C(16)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_CONT (UINT8_C(17)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_STOP (UINT8_C(18)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_TSTP (UINT8_C(19)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_TTIN (UINT8_C(20)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_TTOU (UINT8_C(21)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_URG (UINT8_C(22)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_XCPU (UINT8_C(23)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_XFSZ (UINT8_C(24)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_VTALRM (UINT8_C(25)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_PROF (UINT8_C(26)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_WINCH (UINT8_C(27)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_POLL (UINT8_C(28)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_PWR (UINT8_C(29)) |
|
|
| |
| |
| |
| |
| #define __WASI_SIGNAL_SYS (UINT8_C(30)) |
|
|
| _Static_assert(sizeof(__wasi_signal_t) == 1, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_signal_t) == 1, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint16_t __wasi_riflags_t; |
|
|
| |
| |
| |
| #define __WASI_RIFLAGS_RECV_PEEK (UINT16_C(1)) |
|
|
| |
| |
| |
| #define __WASI_RIFLAGS_RECV_WAITALL (UINT16_C(2)) |
|
|
| _Static_assert(sizeof(__wasi_riflags_t) == 2, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_riflags_t) == 2, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint16_t __wasi_roflags_t; |
|
|
| |
| |
| |
| #define __WASI_ROFLAGS_RECV_DATA_TRUNCATED (UINT16_C(1)) |
|
|
| _Static_assert(sizeof(__wasi_roflags_t) == 2, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_roflags_t) == 2, "witx calculated align"); |
|
|
| |
| |
| |
| |
| typedef uint16_t __wasi_siflags_t; |
|
|
| _Static_assert(sizeof(__wasi_siflags_t) == 2, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_siflags_t) == 2, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint8_t __wasi_sdflags_t; |
|
|
| |
| |
| |
| #define __WASI_SDFLAGS_RD (UINT8_C(1)) |
|
|
| |
| |
| |
| #define __WASI_SDFLAGS_WR (UINT8_C(2)) |
|
|
| _Static_assert(sizeof(__wasi_sdflags_t) == 1, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_sdflags_t) == 1, "witx calculated align"); |
|
|
| |
| |
| |
| typedef uint8_t __wasi_preopentype_t; |
|
|
| |
| |
| |
| #define __WASI_PREOPENTYPE_DIR (UINT8_C(0)) |
|
|
| _Static_assert(sizeof(__wasi_preopentype_t) == 1, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_preopentype_t) == 1, "witx calculated align"); |
|
|
| |
| |
| |
| typedef struct __wasi_prestat_dir_t { |
| |
| |
| |
| __wasi_size_t pr_name_len; |
|
|
| } __wasi_prestat_dir_t; |
|
|
| _Static_assert(sizeof(__wasi_prestat_dir_t) == 4, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_prestat_dir_t) == 4, "witx calculated align"); |
| _Static_assert(offsetof(__wasi_prestat_dir_t, pr_name_len) == 0, "witx calculated offset"); |
|
|
| |
| |
| |
| typedef union __wasi_prestat_u_t { |
| |
| |
| |
| __wasi_prestat_dir_t dir; |
|
|
| } __wasi_prestat_u_t; |
|
|
| _Static_assert(sizeof(__wasi_prestat_u_t) == 4, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_prestat_u_t) == 4, "witx calculated align"); |
|
|
| |
| |
| |
| typedef struct __wasi_prestat_t { |
| |
| |
| |
| __wasi_preopentype_t pr_type; |
|
|
| |
| |
| |
| __wasi_prestat_u_t u; |
|
|
| } __wasi_prestat_t; |
|
|
| _Static_assert(sizeof(__wasi_prestat_t) == 8, "witx calculated size"); |
| _Static_assert(_Alignof(__wasi_prestat_t) == 4, "witx calculated align"); |
| _Static_assert(offsetof(__wasi_prestat_t, pr_type) == 0, "witx calculated offset"); |
| _Static_assert(offsetof(__wasi_prestat_t, u) == 4, "witx calculated offset"); |
|
|
| |
| |
| |
| |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_args_get( |
| uint8_t * * argv, |
|
|
| uint8_t * argv_buf |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("args_get"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| __wasi_errno_t __wasi_args_sizes_get( |
| |
| |
| |
| __wasi_size_t *argc, |
| |
| |
| |
| __wasi_size_t *argv_buf_size |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("args_sizes_get"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_environ_get( |
| uint8_t * * environ, |
|
|
| uint8_t * environ_buf |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("environ_get"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| __wasi_errno_t __wasi_environ_sizes_get( |
| |
| |
| |
| __wasi_size_t *argc, |
| |
| |
| |
| __wasi_size_t *argv_buf_size |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("environ_sizes_get"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| |
| |
| __wasi_errno_t __wasi_clock_res_get( |
| |
| |
| |
| __wasi_clockid_t id, |
|
|
| |
| |
| |
| __wasi_timestamp_t *resolution |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("clock_res_get"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_clock_time_get( |
| |
| |
| |
| __wasi_clockid_t id, |
|
|
| |
| |
| |
| __wasi_timestamp_t precision, |
|
|
| |
| |
| |
| __wasi_timestamp_t *time |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("clock_time_get"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_advise( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_filesize_t offset, |
|
|
| |
| |
| |
| __wasi_filesize_t len, |
|
|
| |
| |
| |
| __wasi_advice_t advice |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_advise"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_allocate( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_filesize_t offset, |
|
|
| |
| |
| |
| __wasi_filesize_t len |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_allocate"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_close( |
| __wasi_fd_t fd |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_close"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_datasync( |
| __wasi_fd_t fd |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_datasync"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_fdstat_get( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_fdstat_t *stat |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_fdstat_get"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_fdstat_set_flags( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_fdflags_t flags |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_fdstat_set_flags"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_fdstat_set_rights( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_rights_t fs_rights_base, |
|
|
| __wasi_rights_t fs_rights_inheriting |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_fdstat_set_rights"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| __wasi_errno_t __wasi_fd_filestat_get( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_filestat_t *buf |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_filestat_get"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_filestat_set_size( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_filesize_t size |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_filestat_set_size"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_filestat_set_times( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_timestamp_t atim, |
|
|
| |
| |
| |
| __wasi_timestamp_t mtim, |
|
|
| |
| |
| |
| __wasi_fstflags_t fst_flags |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_filestat_set_times"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_pread( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| const __wasi_iovec_t *iovs, |
|
|
| |
| |
| |
| size_t iovs_len, |
|
|
| |
| |
| |
| __wasi_filesize_t offset, |
|
|
| |
| |
| |
| __wasi_size_t *nread |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_pread"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| __wasi_errno_t __wasi_fd_prestat_get( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_prestat_t *buf |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_prestat_get"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| __wasi_errno_t __wasi_fd_prestat_dir_name( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| uint8_t * path, |
|
|
| __wasi_size_t path_len |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_prestat_dir_name"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_pwrite( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| const __wasi_ciovec_t *iovs, |
|
|
| |
| |
| |
| size_t iovs_len, |
|
|
| |
| |
| |
| __wasi_filesize_t offset, |
|
|
| |
| |
| |
| __wasi_size_t *nwritten |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_pwrite"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_read( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| const __wasi_iovec_t *iovs, |
|
|
| |
| |
| |
| size_t iovs_len, |
|
|
| |
| |
| |
| __wasi_size_t *nread |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_read"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_readdir( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| uint8_t * buf, |
|
|
| __wasi_size_t buf_len, |
|
|
| |
| |
| |
| __wasi_dircookie_t cookie, |
|
|
| |
| |
| |
| __wasi_size_t *bufused |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_readdir"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_renumber( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_fd_t to |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_renumber"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_seek( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_filedelta_t offset, |
|
|
| |
| |
| |
| __wasi_whence_t whence, |
|
|
| |
| |
| |
| __wasi_filesize_t *newoffset |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_seek"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_sync( |
| __wasi_fd_t fd |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_sync"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_tell( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_filesize_t *offset |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_tell"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_fd_write( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| const __wasi_ciovec_t *iovs, |
|
|
| |
| |
| |
| size_t iovs_len, |
|
|
| |
| |
| |
| __wasi_size_t *nwritten |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("fd_write"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_path_create_directory( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| const char *path, |
|
|
| |
| |
| |
| size_t path_len |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("path_create_directory"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_path_filestat_get( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_lookupflags_t flags, |
|
|
| |
| |
| |
| const char *path, |
|
|
| |
| |
| |
| size_t path_len, |
|
|
| |
| |
| |
| __wasi_filestat_t *buf |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("path_filestat_get"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_path_filestat_set_times( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_lookupflags_t flags, |
|
|
| |
| |
| |
| const char *path, |
|
|
| |
| |
| |
| size_t path_len, |
|
|
| |
| |
| |
| __wasi_timestamp_t atim, |
|
|
| |
| |
| |
| __wasi_timestamp_t mtim, |
|
|
| |
| |
| |
| __wasi_fstflags_t fst_flags |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("path_filestat_set_times"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_path_link( |
| __wasi_fd_t old_fd, |
|
|
| |
| |
| |
| __wasi_lookupflags_t old_flags, |
|
|
| |
| |
| |
| const char *old_path, |
|
|
| |
| |
| |
| size_t old_path_len, |
|
|
| |
| |
| |
| __wasi_fd_t new_fd, |
|
|
| |
| |
| |
| const char *new_path, |
|
|
| |
| |
| |
| size_t new_path_len |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("path_link"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| __wasi_errno_t __wasi_path_open( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_lookupflags_t dirflags, |
|
|
| |
| |
| |
| |
| const char *path, |
|
|
| |
| |
| |
| size_t path_len, |
|
|
| |
| |
| |
| __wasi_oflags_t oflags, |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| __wasi_rights_t fs_rights_base, |
|
|
| __wasi_rights_t fs_rights_inheriting, |
|
|
| __wasi_fdflags_t fdflags, |
|
|
| |
| |
| |
| __wasi_fd_t *opened_fd |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("path_open"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_path_readlink( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| const char *path, |
|
|
| |
| |
| |
| size_t path_len, |
|
|
| |
| |
| |
| uint8_t * buf, |
|
|
| __wasi_size_t buf_len, |
|
|
| |
| |
| |
| __wasi_size_t *bufused |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("path_readlink"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| |
| __wasi_errno_t __wasi_path_remove_directory( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| const char *path, |
|
|
| |
| |
| |
| size_t path_len |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("path_remove_directory"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_path_rename( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| const char *old_path, |
|
|
| |
| |
| |
| size_t old_path_len, |
|
|
| |
| |
| |
| __wasi_fd_t new_fd, |
|
|
| |
| |
| |
| const char *new_path, |
|
|
| |
| |
| |
| size_t new_path_len |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("path_rename"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_path_symlink( |
| |
| |
| |
| const char *old_path, |
|
|
| |
| |
| |
| size_t old_path_len, |
|
|
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| const char *new_path, |
|
|
| |
| |
| |
| size_t new_path_len |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("path_symlink"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| |
| __wasi_errno_t __wasi_path_unlink_file( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| const char *path, |
|
|
| |
| |
| |
| size_t path_len |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("path_unlink_file"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| __wasi_errno_t __wasi_poll_oneoff( |
| |
| |
| |
| const __wasi_subscription_t * in, |
|
|
| |
| |
| |
| __wasi_event_t * out, |
|
|
| |
| |
| |
| __wasi_size_t nsubscriptions, |
|
|
| |
| |
| |
| __wasi_size_t *nevents |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("poll_oneoff"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| |
| _Noreturn void __wasi_proc_exit( |
| |
| |
| |
| __wasi_exitcode_t rval |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("proc_exit"))); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_proc_raise( |
| |
| |
| |
| __wasi_signal_t sig |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("proc_raise"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_sched_yield( |
| void |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("sched_yield"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| __wasi_errno_t __wasi_random_get( |
| |
| |
| |
| uint8_t * buf, |
|
|
| __wasi_size_t buf_len |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("random_get"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| |
| __wasi_errno_t __wasi_sock_recv( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| const __wasi_iovec_t *ri_data, |
|
|
| |
| |
| |
| size_t ri_data_len, |
|
|
| |
| |
| |
| __wasi_riflags_t ri_flags, |
|
|
| |
| |
| |
| __wasi_size_t *ro_datalen, |
| |
| |
| |
| __wasi_roflags_t *ro_flags |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("sock_recv"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| |
| __wasi_errno_t __wasi_sock_send( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| const __wasi_ciovec_t *si_data, |
|
|
| |
| |
| |
| size_t si_data_len, |
|
|
| |
| |
| |
| __wasi_siflags_t si_flags, |
|
|
| |
| |
| |
| __wasi_size_t *so_datalen |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("sock_send"), |
| __warn_unused_result__ |
| )); |
|
|
| |
| |
| |
| |
| __wasi_errno_t __wasi_sock_shutdown( |
| __wasi_fd_t fd, |
|
|
| |
| |
| |
| __wasi_sdflags_t how |
| ) __attribute__(( |
| __import_module__("wasi_snapshot_preview1"), |
| __import_name__("sock_shutdown"), |
| __warn_unused_result__ |
| )); |
|
|
| |
|
|
| #ifdef __cplusplus |
| } |
| #endif |
|
|
| #pragma pop_macro("_Static_assert") |
|
|
| #endif |
|
|