summaryrefslogtreecommitdiffstats
path: root/third_party/rust/lucet-wasi-wasmsbx/src/wasi_host.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /third_party/rust/lucet-wasi-wasmsbx/src/wasi_host.rs
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/lucet-wasi-wasmsbx/src/wasi_host.rs')
-rw-r--r--third_party/rust/lucet-wasi-wasmsbx/src/wasi_host.rs1035
1 files changed, 1035 insertions, 0 deletions
diff --git a/third_party/rust/lucet-wasi-wasmsbx/src/wasi_host.rs b/third_party/rust/lucet-wasi-wasmsbx/src/wasi_host.rs
new file mode 100644
index 0000000000..08ae163634
--- /dev/null
+++ b/third_party/rust/lucet-wasi-wasmsbx/src/wasi_host.rs
@@ -0,0 +1,1035 @@
+/* automatically generated by rust-bindgen */
+
+pub const __WASI_ADVICE_NORMAL: u32 = 0;
+pub const __WASI_ADVICE_SEQUENTIAL: u32 = 1;
+pub const __WASI_ADVICE_RANDOM: u32 = 2;
+pub const __WASI_ADVICE_WILLNEED: u32 = 3;
+pub const __WASI_ADVICE_DONTNEED: u32 = 4;
+pub const __WASI_ADVICE_NOREUSE: u32 = 5;
+pub const __WASI_CLOCK_REALTIME: u32 = 0;
+pub const __WASI_CLOCK_MONOTONIC: u32 = 1;
+pub const __WASI_CLOCK_PROCESS_CPUTIME_ID: u32 = 2;
+pub const __WASI_CLOCK_THREAD_CPUTIME_ID: u32 = 3;
+pub const __WASI_DIRCOOKIE_START: u32 = 0;
+pub const __WASI_ESUCCESS: u32 = 0;
+pub const __WASI_E2BIG: u32 = 1;
+pub const __WASI_EACCES: u32 = 2;
+pub const __WASI_EADDRINUSE: u32 = 3;
+pub const __WASI_EADDRNOTAVAIL: u32 = 4;
+pub const __WASI_EAFNOSUPPORT: u32 = 5;
+pub const __WASI_EAGAIN: u32 = 6;
+pub const __WASI_EALREADY: u32 = 7;
+pub const __WASI_EBADF: u32 = 8;
+pub const __WASI_EBADMSG: u32 = 9;
+pub const __WASI_EBUSY: u32 = 10;
+pub const __WASI_ECANCELED: u32 = 11;
+pub const __WASI_ECHILD: u32 = 12;
+pub const __WASI_ECONNABORTED: u32 = 13;
+pub const __WASI_ECONNREFUSED: u32 = 14;
+pub const __WASI_ECONNRESET: u32 = 15;
+pub const __WASI_EDEADLK: u32 = 16;
+pub const __WASI_EDESTADDRREQ: u32 = 17;
+pub const __WASI_EDOM: u32 = 18;
+pub const __WASI_EDQUOT: u32 = 19;
+pub const __WASI_EEXIST: u32 = 20;
+pub const __WASI_EFAULT: u32 = 21;
+pub const __WASI_EFBIG: u32 = 22;
+pub const __WASI_EHOSTUNREACH: u32 = 23;
+pub const __WASI_EIDRM: u32 = 24;
+pub const __WASI_EILSEQ: u32 = 25;
+pub const __WASI_EINPROGRESS: u32 = 26;
+pub const __WASI_EINTR: u32 = 27;
+pub const __WASI_EINVAL: u32 = 28;
+pub const __WASI_EIO: u32 = 29;
+pub const __WASI_EISCONN: u32 = 30;
+pub const __WASI_EISDIR: u32 = 31;
+pub const __WASI_ELOOP: u32 = 32;
+pub const __WASI_EMFILE: u32 = 33;
+pub const __WASI_EMLINK: u32 = 34;
+pub const __WASI_EMSGSIZE: u32 = 35;
+pub const __WASI_EMULTIHOP: u32 = 36;
+pub const __WASI_ENAMETOOLONG: u32 = 37;
+pub const __WASI_ENETDOWN: u32 = 38;
+pub const __WASI_ENETRESET: u32 = 39;
+pub const __WASI_ENETUNREACH: u32 = 40;
+pub const __WASI_ENFILE: u32 = 41;
+pub const __WASI_ENOBUFS: u32 = 42;
+pub const __WASI_ENODEV: u32 = 43;
+pub const __WASI_ENOENT: u32 = 44;
+pub const __WASI_ENOEXEC: u32 = 45;
+pub const __WASI_ENOLCK: u32 = 46;
+pub const __WASI_ENOLINK: u32 = 47;
+pub const __WASI_ENOMEM: u32 = 48;
+pub const __WASI_ENOMSG: u32 = 49;
+pub const __WASI_ENOPROTOOPT: u32 = 50;
+pub const __WASI_ENOSPC: u32 = 51;
+pub const __WASI_ENOSYS: u32 = 52;
+pub const __WASI_ENOTCONN: u32 = 53;
+pub const __WASI_ENOTDIR: u32 = 54;
+pub const __WASI_ENOTEMPTY: u32 = 55;
+pub const __WASI_ENOTRECOVERABLE: u32 = 56;
+pub const __WASI_ENOTSOCK: u32 = 57;
+pub const __WASI_ENOTSUP: u32 = 58;
+pub const __WASI_ENOTTY: u32 = 59;
+pub const __WASI_ENXIO: u32 = 60;
+pub const __WASI_EOVERFLOW: u32 = 61;
+pub const __WASI_EOWNERDEAD: u32 = 62;
+pub const __WASI_EPERM: u32 = 63;
+pub const __WASI_EPIPE: u32 = 64;
+pub const __WASI_EPROTO: u32 = 65;
+pub const __WASI_EPROTONOSUPPORT: u32 = 66;
+pub const __WASI_EPROTOTYPE: u32 = 67;
+pub const __WASI_ERANGE: u32 = 68;
+pub const __WASI_EROFS: u32 = 69;
+pub const __WASI_ESPIPE: u32 = 70;
+pub const __WASI_ESRCH: u32 = 71;
+pub const __WASI_ESTALE: u32 = 72;
+pub const __WASI_ETIMEDOUT: u32 = 73;
+pub const __WASI_ETXTBSY: u32 = 74;
+pub const __WASI_EXDEV: u32 = 75;
+pub const __WASI_ENOTCAPABLE: u32 = 76;
+pub const __WASI_EVENT_FD_READWRITE_HANGUP: u32 = 1;
+pub const __WASI_EVENTTYPE_CLOCK: u32 = 0;
+pub const __WASI_EVENTTYPE_FD_READ: u32 = 1;
+pub const __WASI_EVENTTYPE_FD_WRITE: u32 = 2;
+pub const __WASI_FDFLAG_APPEND: u32 = 1;
+pub const __WASI_FDFLAG_DSYNC: u32 = 2;
+pub const __WASI_FDFLAG_NONBLOCK: u32 = 4;
+pub const __WASI_FDFLAG_RSYNC: u32 = 8;
+pub const __WASI_FDFLAG_SYNC: u32 = 16;
+pub const __WASI_FILETYPE_UNKNOWN: u32 = 0;
+pub const __WASI_FILETYPE_BLOCK_DEVICE: u32 = 1;
+pub const __WASI_FILETYPE_CHARACTER_DEVICE: u32 = 2;
+pub const __WASI_FILETYPE_DIRECTORY: u32 = 3;
+pub const __WASI_FILETYPE_REGULAR_FILE: u32 = 4;
+pub const __WASI_FILETYPE_SOCKET_DGRAM: u32 = 5;
+pub const __WASI_FILETYPE_SOCKET_STREAM: u32 = 6;
+pub const __WASI_FILETYPE_SYMBOLIC_LINK: u32 = 7;
+pub const __WASI_FILESTAT_SET_ATIM: u32 = 1;
+pub const __WASI_FILESTAT_SET_ATIM_NOW: u32 = 2;
+pub const __WASI_FILESTAT_SET_MTIM: u32 = 4;
+pub const __WASI_FILESTAT_SET_MTIM_NOW: u32 = 8;
+pub const __WASI_LOOKUP_SYMLINK_FOLLOW: u32 = 1;
+pub const __WASI_O_CREAT: u32 = 1;
+pub const __WASI_O_DIRECTORY: u32 = 2;
+pub const __WASI_O_EXCL: u32 = 4;
+pub const __WASI_O_TRUNC: u32 = 8;
+pub const __WASI_SOCK_RECV_PEEK: u32 = 1;
+pub const __WASI_SOCK_RECV_WAITALL: u32 = 2;
+pub const __WASI_RIGHT_FD_DATASYNC: u32 = 1;
+pub const __WASI_RIGHT_FD_READ: u32 = 2;
+pub const __WASI_RIGHT_FD_SEEK: u32 = 4;
+pub const __WASI_RIGHT_FD_FDSTAT_SET_FLAGS: u32 = 8;
+pub const __WASI_RIGHT_FD_SYNC: u32 = 16;
+pub const __WASI_RIGHT_FD_TELL: u32 = 32;
+pub const __WASI_RIGHT_FD_WRITE: u32 = 64;
+pub const __WASI_RIGHT_FD_ADVISE: u32 = 128;
+pub const __WASI_RIGHT_FD_ALLOCATE: u32 = 256;
+pub const __WASI_RIGHT_PATH_CREATE_DIRECTORY: u32 = 512;
+pub const __WASI_RIGHT_PATH_CREATE_FILE: u32 = 1024;
+pub const __WASI_RIGHT_PATH_LINK_SOURCE: u32 = 2048;
+pub const __WASI_RIGHT_PATH_LINK_TARGET: u32 = 4096;
+pub const __WASI_RIGHT_PATH_OPEN: u32 = 8192;
+pub const __WASI_RIGHT_FD_READDIR: u32 = 16384;
+pub const __WASI_RIGHT_PATH_READLINK: u32 = 32768;
+pub const __WASI_RIGHT_PATH_RENAME_SOURCE: u32 = 65536;
+pub const __WASI_RIGHT_PATH_RENAME_TARGET: u32 = 131072;
+pub const __WASI_RIGHT_PATH_FILESTAT_GET: u32 = 262144;
+pub const __WASI_RIGHT_PATH_FILESTAT_SET_SIZE: u32 = 524288;
+pub const __WASI_RIGHT_PATH_FILESTAT_SET_TIMES: u32 = 1048576;
+pub const __WASI_RIGHT_FD_FILESTAT_GET: u32 = 2097152;
+pub const __WASI_RIGHT_FD_FILESTAT_SET_SIZE: u32 = 4194304;
+pub const __WASI_RIGHT_FD_FILESTAT_SET_TIMES: u32 = 8388608;
+pub const __WASI_RIGHT_PATH_SYMLINK: u32 = 16777216;
+pub const __WASI_RIGHT_PATH_REMOVE_DIRECTORY: u32 = 33554432;
+pub const __WASI_RIGHT_PATH_UNLINK_FILE: u32 = 67108864;
+pub const __WASI_RIGHT_POLL_FD_READWRITE: u32 = 134217728;
+pub const __WASI_RIGHT_SOCK_SHUTDOWN: u32 = 268435456;
+pub const __WASI_SOCK_RECV_DATA_TRUNCATED: u32 = 1;
+pub const __WASI_SHUT_RD: u32 = 1;
+pub const __WASI_SHUT_WR: u32 = 2;
+pub const __WASI_SIGHUP: u32 = 1;
+pub const __WASI_SIGINT: u32 = 2;
+pub const __WASI_SIGQUIT: u32 = 3;
+pub const __WASI_SIGILL: u32 = 4;
+pub const __WASI_SIGTRAP: u32 = 5;
+pub const __WASI_SIGABRT: u32 = 6;
+pub const __WASI_SIGBUS: u32 = 7;
+pub const __WASI_SIGFPE: u32 = 8;
+pub const __WASI_SIGKILL: u32 = 9;
+pub const __WASI_SIGUSR1: u32 = 10;
+pub const __WASI_SIGSEGV: u32 = 11;
+pub const __WASI_SIGUSR2: u32 = 12;
+pub const __WASI_SIGPIPE: u32 = 13;
+pub const __WASI_SIGALRM: u32 = 14;
+pub const __WASI_SIGTERM: u32 = 15;
+pub const __WASI_SIGCHLD: u32 = 16;
+pub const __WASI_SIGCONT: u32 = 17;
+pub const __WASI_SIGSTOP: u32 = 18;
+pub const __WASI_SIGTSTP: u32 = 19;
+pub const __WASI_SIGTTIN: u32 = 20;
+pub const __WASI_SIGTTOU: u32 = 21;
+pub const __WASI_SIGURG: u32 = 22;
+pub const __WASI_SIGXCPU: u32 = 23;
+pub const __WASI_SIGXFSZ: u32 = 24;
+pub const __WASI_SIGVTALRM: u32 = 25;
+pub const __WASI_SIGPROF: u32 = 26;
+pub const __WASI_SIGWINCH: u32 = 27;
+pub const __WASI_SIGPOLL: u32 = 28;
+pub const __WASI_SIGPWR: u32 = 29;
+pub const __WASI_SIGSYS: u32 = 30;
+pub const __WASI_SUBSCRIPTION_CLOCK_ABSTIME: u32 = 1;
+pub const __WASI_WHENCE_CUR: u32 = 0;
+pub const __WASI_WHENCE_END: u32 = 1;
+pub const __WASI_WHENCE_SET: u32 = 2;
+pub const __WASI_PREOPENTYPE_DIR: u32 = 0;
+pub type __wasi_advice_t = u8;
+pub type __wasi_clockid_t = u32;
+pub type __wasi_device_t = u64;
+pub type __wasi_dircookie_t = u64;
+pub type __wasi_errno_t = u16;
+pub type __wasi_eventrwflags_t = u16;
+pub type __wasi_eventtype_t = u8;
+pub type __wasi_exitcode_t = u32;
+pub type __wasi_fd_t = u32;
+pub type __wasi_fdflags_t = u16;
+pub type __wasi_filedelta_t = i64;
+pub type __wasi_filesize_t = u64;
+pub type __wasi_filetype_t = u8;
+pub type __wasi_fstflags_t = u16;
+pub type __wasi_inode_t = u64;
+pub type __wasi_linkcount_t = u32;
+pub type __wasi_lookupflags_t = u32;
+pub type __wasi_oflags_t = u16;
+pub type __wasi_riflags_t = u16;
+pub type __wasi_rights_t = u64;
+pub type __wasi_roflags_t = u16;
+pub type __wasi_sdflags_t = u8;
+pub type __wasi_siflags_t = u16;
+pub type __wasi_signal_t = u8;
+pub type __wasi_subclockflags_t = u16;
+pub type __wasi_timestamp_t = u64;
+pub type __wasi_userdata_t = u64;
+pub type __wasi_whence_t = u8;
+pub type __wasi_preopentype_t = u8;
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_dirent_t {
+ pub d_next: __wasi_dircookie_t,
+ pub d_ino: __wasi_inode_t,
+ pub d_namlen: u32,
+ pub d_type: __wasi_filetype_t,
+}
+#[test]
+fn bindgen_test_layout___wasi_dirent_t() {
+ assert_eq!(
+ ::std::mem::size_of::<__wasi_dirent_t>(),
+ 24usize,
+ concat!("Size of: ", stringify!(__wasi_dirent_t))
+ );
+ assert_eq!(
+ ::std::mem::align_of::<__wasi_dirent_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__wasi_dirent_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_next as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_dirent_t),
+ "::",
+ stringify!(d_next)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_ino as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_dirent_t),
+ "::",
+ stringify!(d_ino)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_namlen as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_dirent_t),
+ "::",
+ stringify!(d_namlen)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_type as *const _ as usize },
+ 20usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_dirent_t),
+ "::",
+ stringify!(d_type)
+ )
+ );
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct __wasi_event_t {
+ pub userdata: __wasi_userdata_t,
+ pub error: __wasi_errno_t,
+ pub type_: __wasi_eventtype_t,
+ pub u: __wasi_event_t___wasi_event_u,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union __wasi_event_t___wasi_event_u {
+ pub fd_readwrite: __wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t,
+ _bindgen_union_align: [u64; 2usize],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t {
+ pub nbytes: __wasi_filesize_t,
+ pub flags: __wasi_eventrwflags_t,
+}
+#[test]
+fn bindgen_test_layout___wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t() {
+ assert_eq!(
+ ::std::mem::size_of::<__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t>(),
+ 16usize,
+ concat!(
+ "Size of: ",
+ stringify!(__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t)
+ )
+ );
+ assert_eq!(
+ ::std::mem::align_of::<__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t>(),
+ 8usize,
+ concat!(
+ "Alignment of ",
+ stringify!(__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::std::ptr::null::<__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t>()))
+ .nbytes as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t),
+ "::",
+ stringify!(nbytes)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::std::ptr::null::<__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t>()))
+ .flags as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t),
+ "::",
+ stringify!(flags)
+ )
+ );
+}
+#[test]
+fn bindgen_test_layout___wasi_event_t___wasi_event_u() {
+ assert_eq!(
+ ::std::mem::size_of::<__wasi_event_t___wasi_event_u>(),
+ 16usize,
+ concat!("Size of: ", stringify!(__wasi_event_t___wasi_event_u))
+ );
+ assert_eq!(
+ ::std::mem::align_of::<__wasi_event_t___wasi_event_u>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__wasi_event_t___wasi_event_u))
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::std::ptr::null::<__wasi_event_t___wasi_event_u>())).fd_readwrite as *const _
+ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_event_t___wasi_event_u),
+ "::",
+ stringify!(fd_readwrite)
+ )
+ );
+}
+#[test]
+fn bindgen_test_layout___wasi_event_t() {
+ assert_eq!(
+ ::std::mem::size_of::<__wasi_event_t>(),
+ 32usize,
+ concat!("Size of: ", stringify!(__wasi_event_t))
+ );
+ assert_eq!(
+ ::std::mem::align_of::<__wasi_event_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__wasi_event_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).userdata as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_event_t),
+ "::",
+ stringify!(userdata)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).error as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_event_t),
+ "::",
+ stringify!(error)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).type_ as *const _ as usize },
+ 10usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_event_t),
+ "::",
+ stringify!(type_)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).u as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_event_t),
+ "::",
+ stringify!(u)
+ )
+ );
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct __wasi_prestat_t {
+ pub pr_type: __wasi_preopentype_t,
+ pub u: __wasi_prestat_t___wasi_prestat_u,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union __wasi_prestat_t___wasi_prestat_u {
+ pub dir: __wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t,
+ _bindgen_union_align: u64,
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t {
+ pub pr_name_len: usize,
+}
+#[test]
+fn bindgen_test_layout___wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t() {
+ assert_eq!(
+ ::std::mem::size_of::<__wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t>(),
+ 8usize,
+ concat!(
+ "Size of: ",
+ stringify!(__wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t)
+ )
+ );
+ assert_eq!(
+ ::std::mem::align_of::<__wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t>(),
+ 8usize,
+ concat!(
+ "Alignment of ",
+ stringify!(__wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::std::ptr::null::<__wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t>()))
+ .pr_name_len as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t),
+ "::",
+ stringify!(pr_name_len)
+ )
+ );
+}
+#[test]
+fn bindgen_test_layout___wasi_prestat_t___wasi_prestat_u() {
+ assert_eq!(
+ ::std::mem::size_of::<__wasi_prestat_t___wasi_prestat_u>(),
+ 8usize,
+ concat!("Size of: ", stringify!(__wasi_prestat_t___wasi_prestat_u))
+ );
+ assert_eq!(
+ ::std::mem::align_of::<__wasi_prestat_t___wasi_prestat_u>(),
+ 8usize,
+ concat!(
+ "Alignment of ",
+ stringify!(__wasi_prestat_t___wasi_prestat_u)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::std::ptr::null::<__wasi_prestat_t___wasi_prestat_u>())).dir as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_prestat_t___wasi_prestat_u),
+ "::",
+ stringify!(dir)
+ )
+ );
+}
+#[test]
+fn bindgen_test_layout___wasi_prestat_t() {
+ assert_eq!(
+ ::std::mem::size_of::<__wasi_prestat_t>(),
+ 16usize,
+ concat!("Size of: ", stringify!(__wasi_prestat_t))
+ );
+ assert_eq!(
+ ::std::mem::align_of::<__wasi_prestat_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__wasi_prestat_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_prestat_t>())).pr_type as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_prestat_t),
+ "::",
+ stringify!(pr_type)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_prestat_t>())).u as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_prestat_t),
+ "::",
+ stringify!(u)
+ )
+ );
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_fdstat_t {
+ pub fs_filetype: __wasi_filetype_t,
+ pub fs_flags: __wasi_fdflags_t,
+ pub fs_rights_base: __wasi_rights_t,
+ pub fs_rights_inheriting: __wasi_rights_t,
+}
+#[test]
+fn bindgen_test_layout___wasi_fdstat_t() {
+ assert_eq!(
+ ::std::mem::size_of::<__wasi_fdstat_t>(),
+ 24usize,
+ concat!("Size of: ", stringify!(__wasi_fdstat_t))
+ );
+ assert_eq!(
+ ::std::mem::align_of::<__wasi_fdstat_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__wasi_fdstat_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_filetype as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_fdstat_t),
+ "::",
+ stringify!(fs_filetype)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_flags as *const _ as usize },
+ 2usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_fdstat_t),
+ "::",
+ stringify!(fs_flags)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_rights_base as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_fdstat_t),
+ "::",
+ stringify!(fs_rights_base)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_rights_inheriting as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_fdstat_t),
+ "::",
+ stringify!(fs_rights_inheriting)
+ )
+ );
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_filestat_t {
+ pub st_dev: __wasi_device_t,
+ pub st_ino: __wasi_inode_t,
+ pub st_filetype: __wasi_filetype_t,
+ pub st_nlink: __wasi_linkcount_t,
+ pub st_size: __wasi_filesize_t,
+ pub st_atim: __wasi_timestamp_t,
+ pub st_mtim: __wasi_timestamp_t,
+ pub st_ctim: __wasi_timestamp_t,
+}
+#[test]
+fn bindgen_test_layout___wasi_filestat_t() {
+ assert_eq!(
+ ::std::mem::size_of::<__wasi_filestat_t>(),
+ 56usize,
+ concat!("Size of: ", stringify!(__wasi_filestat_t))
+ );
+ assert_eq!(
+ ::std::mem::align_of::<__wasi_filestat_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__wasi_filestat_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_dev as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_filestat_t),
+ "::",
+ stringify!(st_dev)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_ino as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_filestat_t),
+ "::",
+ stringify!(st_ino)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_filetype as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_filestat_t),
+ "::",
+ stringify!(st_filetype)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_nlink as *const _ as usize },
+ 20usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_filestat_t),
+ "::",
+ stringify!(st_nlink)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_size as *const _ as usize },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_filestat_t),
+ "::",
+ stringify!(st_size)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_atim as *const _ as usize },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_filestat_t),
+ "::",
+ stringify!(st_atim)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_mtim as *const _ as usize },
+ 40usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_filestat_t),
+ "::",
+ stringify!(st_mtim)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).st_ctim as *const _ as usize },
+ 48usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_filestat_t),
+ "::",
+ stringify!(st_ctim)
+ )
+ );
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_ciovec_t {
+ pub buf: *const ::std::os::raw::c_void,
+ pub buf_len: usize,
+}
+#[test]
+fn bindgen_test_layout___wasi_ciovec_t() {
+ assert_eq!(
+ ::std::mem::size_of::<__wasi_ciovec_t>(),
+ 16usize,
+ concat!("Size of: ", stringify!(__wasi_ciovec_t))
+ );
+ assert_eq!(
+ ::std::mem::align_of::<__wasi_ciovec_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__wasi_ciovec_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_ciovec_t>())).buf as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_ciovec_t),
+ "::",
+ stringify!(buf)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_ciovec_t>())).buf_len as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_ciovec_t),
+ "::",
+ stringify!(buf_len)
+ )
+ );
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_iovec_t {
+ pub buf: *mut ::std::os::raw::c_void,
+ pub buf_len: usize,
+}
+#[test]
+fn bindgen_test_layout___wasi_iovec_t() {
+ assert_eq!(
+ ::std::mem::size_of::<__wasi_iovec_t>(),
+ 16usize,
+ concat!("Size of: ", stringify!(__wasi_iovec_t))
+ );
+ assert_eq!(
+ ::std::mem::align_of::<__wasi_iovec_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__wasi_iovec_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_iovec_t>())).buf as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_iovec_t),
+ "::",
+ stringify!(buf)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_iovec_t>())).buf_len as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_iovec_t),
+ "::",
+ stringify!(buf_len)
+ )
+ );
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct __wasi_subscription_t {
+ pub userdata: __wasi_userdata_t,
+ pub type_: __wasi_eventtype_t,
+ pub u: __wasi_subscription_t___wasi_subscription_u,
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub union __wasi_subscription_t___wasi_subscription_u {
+ pub clock: __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
+ pub fd_readwrite:
+ __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t,
+ _bindgen_union_align: [u64; 5usize],
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t {
+ pub identifier: __wasi_userdata_t,
+ pub clock_id: __wasi_clockid_t,
+ pub timeout: __wasi_timestamp_t,
+ pub precision: __wasi_timestamp_t,
+ pub flags: __wasi_subclockflags_t,
+}
+#[test]
+fn bindgen_test_layout___wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t() {
+ assert_eq!(
+ ::std::mem::size_of::<
+ __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
+ >(),
+ 40usize,
+ concat!(
+ "Size of: ",
+ stringify!(__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t)
+ )
+ );
+ assert_eq!(
+ ::std::mem::align_of::<
+ __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
+ >(),
+ 8usize,
+ concat!(
+ "Alignment of ",
+ stringify!(__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::std::ptr::null::<
+ __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
+ >()))
+ .identifier as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t),
+ "::",
+ stringify!(identifier)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::std::ptr::null::<
+ __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
+ >()))
+ .clock_id as *const _ as usize
+ },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t),
+ "::",
+ stringify!(clock_id)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::std::ptr::null::<
+ __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
+ >()))
+ .timeout as *const _ as usize
+ },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t),
+ "::",
+ stringify!(timeout)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::std::ptr::null::<
+ __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
+ >()))
+ .precision as *const _ as usize
+ },
+ 24usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t),
+ "::",
+ stringify!(precision)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::std::ptr::null::<
+ __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t,
+ >()))
+ .flags as *const _ as usize
+ },
+ 32usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_clock_t),
+ "::",
+ stringify!(flags)
+ )
+ );
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t {
+ pub fd: __wasi_fd_t,
+}
+#[test]
+fn bindgen_test_layout___wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t(
+) {
+ assert_eq!(
+ ::std::mem::size_of::<
+ __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t,
+ >(),
+ 4usize,
+ concat!(
+ "Size of: ",
+ stringify!(
+ __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t
+ )
+ )
+ );
+ assert_eq!(
+ ::std::mem::align_of::<
+ __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t,
+ >(),
+ 4usize,
+ concat!(
+ "Alignment of ",
+ stringify!(
+ __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t
+ )
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::std::ptr::null::<
+ __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t,
+ >()))
+ .fd as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(
+ __wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t
+ ),
+ "::",
+ stringify!(fd)
+ )
+ );
+}
+#[test]
+fn bindgen_test_layout___wasi_subscription_t___wasi_subscription_u() {
+ assert_eq!(
+ ::std::mem::size_of::<__wasi_subscription_t___wasi_subscription_u>(),
+ 40usize,
+ concat!(
+ "Size of: ",
+ stringify!(__wasi_subscription_t___wasi_subscription_u)
+ )
+ );
+ assert_eq!(
+ ::std::mem::align_of::<__wasi_subscription_t___wasi_subscription_u>(),
+ 8usize,
+ concat!(
+ "Alignment of ",
+ stringify!(__wasi_subscription_t___wasi_subscription_u)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::std::ptr::null::<__wasi_subscription_t___wasi_subscription_u>())).clock
+ as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_subscription_t___wasi_subscription_u),
+ "::",
+ stringify!(clock)
+ )
+ );
+ assert_eq!(
+ unsafe {
+ &(*(::std::ptr::null::<__wasi_subscription_t___wasi_subscription_u>())).fd_readwrite
+ as *const _ as usize
+ },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_subscription_t___wasi_subscription_u),
+ "::",
+ stringify!(fd_readwrite)
+ )
+ );
+}
+#[test]
+fn bindgen_test_layout___wasi_subscription_t() {
+ assert_eq!(
+ ::std::mem::size_of::<__wasi_subscription_t>(),
+ 56usize,
+ concat!("Size of: ", stringify!(__wasi_subscription_t))
+ );
+ assert_eq!(
+ ::std::mem::align_of::<__wasi_subscription_t>(),
+ 8usize,
+ concat!("Alignment of ", stringify!(__wasi_subscription_t))
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_subscription_t>())).userdata as *const _ as usize },
+ 0usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_subscription_t),
+ "::",
+ stringify!(userdata)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_subscription_t>())).type_ as *const _ as usize },
+ 8usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_subscription_t),
+ "::",
+ stringify!(type_)
+ )
+ );
+ assert_eq!(
+ unsafe { &(*(::std::ptr::null::<__wasi_subscription_t>())).u as *const _ as usize },
+ 16usize,
+ concat!(
+ "Offset of field: ",
+ stringify!(__wasi_subscription_t),
+ "::",
+ stringify!(u)
+ )
+ );
+}