async_wasi/snapshots/common/
types.rs1pub type __uint8_t = ::std::os::raw::c_uchar;
6pub type __uint16_t = ::std::os::raw::c_ushort;
7pub type __int32_t = ::std::os::raw::c_int;
8pub type __uint32_t = ::std::os::raw::c_uint;
9pub type __int64_t = ::std::os::raw::c_long;
10pub type __uint64_t = ::std::os::raw::c_ulong;
11pub type const_uint8_t_ptr = u32;
12pub type uint8_t_ptr = u32;
13pub type __wasi_size_t = u32;
14pub type __wasi_filesize_t = u64;
15pub type __wasi_timestamp_t = u64;
16pub mod __wasi_clockid_t {
17 pub type Type = u32;
18 pub const __WASI_CLOCKID_REALTIME: Type = 0;
19 pub const __WASI_CLOCKID_MONOTONIC: Type = 1;
20 pub const __WASI_CLOCKID_PROCESS_CPUTIME_ID: Type = 2;
21 pub const __WASI_CLOCKID_THREAD_CPUTIME_ID: Type = 3;
22}
23pub mod __wasi_errno_t {
24 pub type Type = u16;
25 pub const __WASI_ERRNO_SUCCESS: Type = 0;
26 pub const __WASI_ERRNO_2BIG: Type = 1;
27 pub const __WASI_ERRNO_ACCES: Type = 2;
28 pub const __WASI_ERRNO_ADDRINUSE: Type = 3;
29 pub const __WASI_ERRNO_ADDRNOTAVAIL: Type = 4;
30 pub const __WASI_ERRNO_AFNOSUPPORT: Type = 5;
31 pub const __WASI_ERRNO_AGAIN: Type = 6;
32 pub const __WASI_ERRNO_ALREADY: Type = 7;
33 pub const __WASI_ERRNO_BADF: Type = 8;
34 pub const __WASI_ERRNO_BADMSG: Type = 9;
35 pub const __WASI_ERRNO_BUSY: Type = 10;
36 pub const __WASI_ERRNO_CANCELED: Type = 11;
37 pub const __WASI_ERRNO_CHILD: Type = 12;
38 pub const __WASI_ERRNO_CONNABORTED: Type = 13;
39 pub const __WASI_ERRNO_CONNREFUSED: Type = 14;
40 pub const __WASI_ERRNO_CONNRESET: Type = 15;
41 pub const __WASI_ERRNO_DEADLK: Type = 16;
42 pub const __WASI_ERRNO_DESTADDRREQ: Type = 17;
43 pub const __WASI_ERRNO_DOM: Type = 18;
44 pub const __WASI_ERRNO_DQUOT: Type = 19;
45 pub const __WASI_ERRNO_EXIST: Type = 20;
46 pub const __WASI_ERRNO_FAULT: Type = 21;
47 pub const __WASI_ERRNO_FBIG: Type = 22;
48 pub const __WASI_ERRNO_HOSTUNREACH: Type = 23;
49 pub const __WASI_ERRNO_IDRM: Type = 24;
50 pub const __WASI_ERRNO_ILSEQ: Type = 25;
51 pub const __WASI_ERRNO_INPROGRESS: Type = 26;
52 pub const __WASI_ERRNO_INTR: Type = 27;
53 pub const __WASI_ERRNO_INVAL: Type = 28;
54 pub const __WASI_ERRNO_IO: Type = 29;
55 pub const __WASI_ERRNO_ISCONN: Type = 30;
56 pub const __WASI_ERRNO_ISDIR: Type = 31;
57 pub const __WASI_ERRNO_LOOP: Type = 32;
58 pub const __WASI_ERRNO_MFILE: Type = 33;
59 pub const __WASI_ERRNO_MLINK: Type = 34;
60 pub const __WASI_ERRNO_MSGSIZE: Type = 35;
61 pub const __WASI_ERRNO_MULTIHOP: Type = 36;
62 pub const __WASI_ERRNO_NAMETOOLONG: Type = 37;
63 pub const __WASI_ERRNO_NETDOWN: Type = 38;
64 pub const __WASI_ERRNO_NETRESET: Type = 39;
65 pub const __WASI_ERRNO_NETUNREACH: Type = 40;
66 pub const __WASI_ERRNO_NFILE: Type = 41;
67 pub const __WASI_ERRNO_NOBUFS: Type = 42;
68 pub const __WASI_ERRNO_NODEV: Type = 43;
69 pub const __WASI_ERRNO_NOENT: Type = 44;
70 pub const __WASI_ERRNO_NOEXEC: Type = 45;
71 pub const __WASI_ERRNO_NOLCK: Type = 46;
72 pub const __WASI_ERRNO_NOLINK: Type = 47;
73 pub const __WASI_ERRNO_NOMEM: Type = 48;
74 pub const __WASI_ERRNO_NOMSG: Type = 49;
75 pub const __WASI_ERRNO_NOPROTOOPT: Type = 50;
76 pub const __WASI_ERRNO_NOSPC: Type = 51;
77 pub const __WASI_ERRNO_NOSYS: Type = 52;
78 pub const __WASI_ERRNO_NOTCONN: Type = 53;
79 pub const __WASI_ERRNO_NOTDIR: Type = 54;
80 pub const __WASI_ERRNO_NOTEMPTY: Type = 55;
81 pub const __WASI_ERRNO_NOTRECOVERABLE: Type = 56;
82 pub const __WASI_ERRNO_NOTSOCK: Type = 57;
83 pub const __WASI_ERRNO_NOTSUP: Type = 58;
84 pub const __WASI_ERRNO_NOTTY: Type = 59;
85 pub const __WASI_ERRNO_NXIO: Type = 60;
86 pub const __WASI_ERRNO_OVERFLOW: Type = 61;
87 pub const __WASI_ERRNO_OWNERDEAD: Type = 62;
88 pub const __WASI_ERRNO_PERM: Type = 63;
89 pub const __WASI_ERRNO_PIPE: Type = 64;
90 pub const __WASI_ERRNO_PROTO: Type = 65;
91 pub const __WASI_ERRNO_PROTONOSUPPORT: Type = 66;
92 pub const __WASI_ERRNO_PROTOTYPE: Type = 67;
93 pub const __WASI_ERRNO_RANGE: Type = 68;
94 pub const __WASI_ERRNO_ROFS: Type = 69;
95 pub const __WASI_ERRNO_SPIPE: Type = 70;
96 pub const __WASI_ERRNO_SRCH: Type = 71;
97 pub const __WASI_ERRNO_STALE: Type = 72;
98 pub const __WASI_ERRNO_TIMEDOUT: Type = 73;
99 pub const __WASI_ERRNO_TXTBSY: Type = 74;
100 pub const __WASI_ERRNO_XDEV: Type = 75;
101 pub const __WASI_ERRNO_NOTCAPABLE: Type = 76;
102 pub const __WASI_ERRNO_AIADDRFAMILY: Type = 77;
103 pub const __WASI_ERRNO_AIAGAIN: Type = 78;
104 pub const __WASI_ERRNO_AIBADFLAG: Type = 79;
105 pub const __WASI_ERRNO_AIFAIL: Type = 80;
106 pub const __WASI_ERRNO_AIFAMILY: Type = 81;
107 pub const __WASI_ERRNO_AIMEMORY: Type = 82;
108 pub const __WASI_ERRNO_AINODATA: Type = 83;
109 pub const __WASI_ERRNO_AINONAME: Type = 84;
110 pub const __WASI_ERRNO_AISERVICE: Type = 85;
111 pub const __WASI_ERRNO_AISOCKTYPE: Type = 86;
112 pub const __WASI_ERRNO_AISYSTEM: Type = 87;
113}
114pub mod __wasi_rights_t {
115 pub type Type = u64;
116 pub const __WASI_RIGHTS_FD_DATASYNC: Type = 1;
117 pub const __WASI_RIGHTS_FD_READ: Type = 2;
118 pub const __WASI_RIGHTS_FD_SEEK: Type = 4;
119 pub const __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS: Type = 8;
120 pub const __WASI_RIGHTS_FD_SYNC: Type = 16;
121 pub const __WASI_RIGHTS_FD_TELL: Type = 32;
122 pub const __WASI_RIGHTS_FD_WRITE: Type = 64;
123 pub const __WASI_RIGHTS_FD_ADVISE: Type = 128;
124 pub const __WASI_RIGHTS_FD_ALLOCATE: Type = 256;
125 pub const __WASI_RIGHTS_PATH_CREATE_DIRECTORY: Type = 512;
126 pub const __WASI_RIGHTS_PATH_CREATE_FILE: Type = 1024;
127 pub const __WASI_RIGHTS_PATH_LINK_SOURCE: Type = 2048;
128 pub const __WASI_RIGHTS_PATH_LINK_TARGET: Type = 4096;
129 pub const __WASI_RIGHTS_PATH_OPEN: Type = 8192;
130 pub const __WASI_RIGHTS_FD_READDIR: Type = 16384;
131 pub const __WASI_RIGHTS_PATH_READLINK: Type = 32768;
132 pub const __WASI_RIGHTS_PATH_RENAME_SOURCE: Type = 65536;
133 pub const __WASI_RIGHTS_PATH_RENAME_TARGET: Type = 131072;
134 pub const __WASI_RIGHTS_PATH_FILESTAT_GET: Type = 262144;
135 pub const __WASI_RIGHTS_PATH_FILESTAT_SET_SIZE: Type = 524288;
136 pub const __WASI_RIGHTS_PATH_FILESTAT_SET_TIMES: Type = 1048576;
137 pub const __WASI_RIGHTS_FD_FILESTAT_GET: Type = 2097152;
138 pub const __WASI_RIGHTS_FD_FILESTAT_SET_SIZE: Type = 4194304;
139 pub const __WASI_RIGHTS_FD_FILESTAT_SET_TIMES: Type = 8388608;
140 pub const __WASI_RIGHTS_PATH_SYMLINK: Type = 16777216;
141 pub const __WASI_RIGHTS_PATH_REMOVE_DIRECTORY: Type = 33554432;
142 pub const __WASI_RIGHTS_PATH_UNLINK_FILE: Type = 67108864;
143 pub const __WASI_RIGHTS_POLL_FD_READWRITE: Type = 134217728;
144 pub const __WASI_RIGHTS_SOCK_SHUTDOWN: Type = 268435456;
145 pub const __WASI_RIGHTS_SOCK_OPEN: Type = 536870912;
146 pub const __WASI_RIGHTS_SOCK_CLOSE: Type = 1073741824;
147 pub const __WASI_RIGHTS_SOCK_BIND: Type = 2147483648;
148 pub const __WASI_RIGHTS_SOCK_RECV: Type = 4294967296;
149 pub const __WASI_RIGHTS_SOCK_RECV_FROM: Type = 8589934592;
150 pub const __WASI_RIGHTS_SOCK_SEND: Type = 17179869184;
151 pub const __WASI_RIGHTS_SOCK_SEND_TO: Type = 34359738368;
152}
153pub type __wasi_fd_t = i32;
154pub type __wasi_sock_d_t = __wasi_fd_t;
155#[repr(C)]
156#[derive(Debug, Copy, Clone)]
157pub struct __wasi_iovec_t {
158 pub buf: uint8_t_ptr,
159 pub buf_len: __wasi_size_t,
160}
161#[repr(C)]
162#[derive(Debug, Copy, Clone)]
163pub struct __wasi_ciovec_t {
164 pub buf: const_uint8_t_ptr,
165 pub buf_len: __wasi_size_t,
166}
167pub type __wasi_filedelta_t = i64;
168pub mod __wasi_whence_t {
169 pub type Type = u8;
170 pub const __WASI_WHENCE_SET: Type = 0;
171 pub const __WASI_WHENCE_CUR: Type = 1;
172 pub const __WASI_WHENCE_END: Type = 2;
173}
174pub type __wasi_dircookie_t = u64;
175pub type __wasi_dirnamlen_t = u32;
176pub type __wasi_inode_t = u64;
177pub mod __wasi_filetype_t {
178 pub type Type = u8;
179 pub const __WASI_FILETYPE_UNKNOWN: Type = 0;
180 pub const __WASI_FILETYPE_BLOCK_DEVICE: Type = 1;
181 pub const __WASI_FILETYPE_CHARACTER_DEVICE: Type = 2;
182 pub const __WASI_FILETYPE_DIRECTORY: Type = 3;
183 pub const __WASI_FILETYPE_REGULAR_FILE: Type = 4;
184 pub const __WASI_FILETYPE_SOCKET_DGRAM: Type = 5;
185 pub const __WASI_FILETYPE_SOCKET_STREAM: Type = 6;
186 pub const __WASI_FILETYPE_SYMBOLIC_LINK: Type = 7;
187}
188#[repr(C)]
189#[derive(Debug, Copy, Clone)]
190pub struct __wasi_dirent_t {
191 pub d_next: __wasi_dircookie_t,
192 pub d_ino: __wasi_inode_t,
193 pub d_namlen: __wasi_dirnamlen_t,
194 pub d_type: __wasi_filetype_t::Type,
195}
196pub mod __wasi_advice_t {
197 pub type Type = u8;
198 pub const __WASI_ADVICE_NORMAL: Type = 0;
199 pub const __WASI_ADVICE_SEQUENTIAL: Type = 1;
200 pub const __WASI_ADVICE_RANDOM: Type = 2;
201 pub const __WASI_ADVICE_WILLNEED: Type = 3;
202 pub const __WASI_ADVICE_DONTNEED: Type = 4;
203 pub const __WASI_ADVICE_NOREUSE: Type = 5;
204}
205pub mod __wasi_fdflags_t {
206 pub type Type = u16;
207 pub const __WASI_FDFLAGS_APPEND: Type = 1;
208 pub const __WASI_FDFLAGS_DSYNC: Type = 2;
209 pub const __WASI_FDFLAGS_NONBLOCK: Type = 4;
210 pub const __WASI_FDFLAGS_RSYNC: Type = 8;
211 pub const __WASI_FDFLAGS_SYNC: Type = 16;
212}
213#[repr(C)]
214#[derive(Debug, Copy, Clone)]
215pub struct __wasi_fdstat_t {
216 pub fs_filetype: __wasi_filetype_t::Type,
217 pub fs_flags: __wasi_fdflags_t::Type,
218 pub fs_rights_base: __wasi_rights_t::Type,
219 pub fs_rights_inheriting: __wasi_rights_t::Type,
220}
221pub type __wasi_device_t = u64;
222pub mod __wasi_fstflags_t {
223 pub type Type = u16;
224 pub const __WASI_FSTFLAGS_ATIM: Type = 1;
225 pub const __WASI_FSTFLAGS_ATIM_NOW: Type = 2;
226 pub const __WASI_FSTFLAGS_MTIM: Type = 4;
227 pub const __WASI_FSTFLAGS_MTIM_NOW: Type = 8;
228}
229pub mod __wasi_lookupflags_t {
230 pub type Type = u32;
231 pub const __WASI_LOOKUPFLAGS_SYMLINK_FOLLOW: Type = 1;
232}
233pub mod __wasi_oflags_t {
234 pub type Type = u16;
235 pub const __WASI_OFLAGS_CREAT: Type = 1;
236 pub const __WASI_OFLAGS_DIRECTORY: Type = 2;
237 pub const __WASI_OFLAGS_EXCL: Type = 4;
238 pub const __WASI_OFLAGS_TRUNC: Type = 8;
239}
240pub type __wasi_linkcount_t = u64;
241#[repr(C)]
242#[derive(Debug, Copy, Clone)]
243pub struct __wasi_filestat_t {
244 pub dev: __wasi_device_t,
245 pub ino: __wasi_inode_t,
246 pub filetype: __wasi_filetype_t::Type,
247 pub nlink: __wasi_linkcount_t,
248 pub size: __wasi_filesize_t,
249 pub atim: __wasi_timestamp_t,
250 pub mtim: __wasi_timestamp_t,
251 pub ctim: __wasi_timestamp_t,
252}
253pub type __wasi_userdata_t = u64;
254pub mod __wasi_eventtype_t {
255 pub type Type = u8;
256 pub const __WASI_EVENTTYPE_CLOCK: Type = 0;
257 pub const __WASI_EVENTTYPE_FD_READ: Type = 1;
258 pub const __WASI_EVENTTYPE_FD_WRITE: Type = 2;
259}
260pub mod __wasi_eventrwflags_t {
261 pub type Type = u16;
262 pub const __WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP: Type = 1;
263}
264#[repr(C)]
265#[derive(Debug, Copy, Clone)]
266pub struct __wasi_event_fd_readwrite_t {
267 pub nbytes: __wasi_filesize_t,
268 pub flags: __wasi_eventrwflags_t::Type,
269}
270#[repr(C)]
271#[derive(Debug, Copy, Clone)]
272pub struct __wasi_event_t {
273 pub userdata: __wasi_userdata_t,
274 pub error: __wasi_errno_t::Type,
275 pub type_: __wasi_eventtype_t::Type,
276 pub fd_readwrite: __wasi_event_fd_readwrite_t,
277}
278pub mod __wasi_subclockflags_t {
279 pub type Type = u16;
280 pub const __WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME: Type = 1;
281}
282#[repr(C)]
283#[derive(Debug, Copy, Clone)]
284pub struct __wasi_subscription_clock_t {
285 pub id: __wasi_clockid_t::Type,
286 pub timeout: __wasi_timestamp_t,
287 pub precision: __wasi_timestamp_t,
288 pub flags: __wasi_subclockflags_t::Type,
289}
290#[repr(C)]
291#[derive(Debug, Copy, Clone)]
292pub struct __wasi_subscription_fd_readwrite_t {
293 pub file_descriptor: __wasi_fd_t,
294}
295#[repr(C)]
296#[derive(Copy, Clone)]
297pub union __wasi_subscription_u_u_t {
298 pub clock: __wasi_subscription_clock_t,
299 pub fd_read: __wasi_subscription_fd_readwrite_t,
300 pub fd_write: __wasi_subscription_fd_readwrite_t,
301}
302impl ::std::fmt::Debug for __wasi_subscription_u_u_t {
303 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
304 write!(f, "__wasi_subscription_u_u_t {{ union }}")
305 }
306}
307#[repr(C)]
308#[derive(Copy, Clone)]
309pub struct __wasi_subscription_u_t {
310 pub tag: __wasi_eventtype_t::Type,
311 pub u: __wasi_subscription_u_u_t,
312}
313impl ::std::fmt::Debug for __wasi_subscription_u_t {
314 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
315 write!(
316 f,
317 "__wasi_subscription_u_t {{ tag: {:?}, u: {:?} }}",
318 self.tag, self.u
319 )
320 }
321}
322#[repr(C)]
323#[derive(Copy, Clone)]
324pub struct __wasi_subscription_t {
325 pub userdata: __wasi_userdata_t,
326 pub u: __wasi_subscription_u_t,
327}
328impl ::std::fmt::Debug for __wasi_subscription_t {
329 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
330 write!(
331 f,
332 "__wasi_subscription_t {{ userdata: {:?}, u: {:?} }}",
333 self.userdata, self.u
334 )
335 }
336}
337pub type __wasi_exitcode_t = u32;
338pub mod __wasi_signal_t {
339 pub type Type = u8;
340 pub const __WASI_SIGNAL_NONE: Type = 0;
341 pub const __WASI_SIGNAL_HUP: Type = 1;
342 pub const __WASI_SIGNAL_INT: Type = 2;
343 pub const __WASI_SIGNAL_QUIT: Type = 3;
344 pub const __WASI_SIGNAL_ILL: Type = 4;
345 pub const __WASI_SIGNAL_TRAP: Type = 5;
346 pub const __WASI_SIGNAL_ABRT: Type = 6;
347 pub const __WASI_SIGNAL_BUS: Type = 7;
348 pub const __WASI_SIGNAL_FPE: Type = 8;
349 pub const __WASI_SIGNAL_KILL: Type = 9;
350 pub const __WASI_SIGNAL_USR1: Type = 10;
351 pub const __WASI_SIGNAL_SEGV: Type = 11;
352 pub const __WASI_SIGNAL_USR2: Type = 12;
353 pub const __WASI_SIGNAL_PIPE: Type = 13;
354 pub const __WASI_SIGNAL_ALRM: Type = 14;
355 pub const __WASI_SIGNAL_TERM: Type = 15;
356 pub const __WASI_SIGNAL_CHLD: Type = 16;
357 pub const __WASI_SIGNAL_CONT: Type = 17;
358 pub const __WASI_SIGNAL_STOP: Type = 18;
359 pub const __WASI_SIGNAL_TSTP: Type = 19;
360 pub const __WASI_SIGNAL_TTIN: Type = 20;
361 pub const __WASI_SIGNAL_TTOU: Type = 21;
362 pub const __WASI_SIGNAL_URG: Type = 22;
363 pub const __WASI_SIGNAL_XCPU: Type = 23;
364 pub const __WASI_SIGNAL_XFSZ: Type = 24;
365 pub const __WASI_SIGNAL_VTALRM: Type = 25;
366 pub const __WASI_SIGNAL_PROF: Type = 26;
367 pub const __WASI_SIGNAL_WINCH: Type = 27;
368 pub const __WASI_SIGNAL_POLL: Type = 28;
369 pub const __WASI_SIGNAL_PWR: Type = 29;
370 pub const __WASI_SIGNAL_SYS: Type = 30;
371}
372pub mod __wasi_address_family_t {
373 pub type Type = u8;
374 pub const __WASI_ADDRESS_FAMILY_UNSPEC: Type = 0;
375 pub const __WASI_ADDRESS_FAMILY_INET4: Type = 1;
376 pub const __WASI_ADDRESS_FAMILY_INET6: Type = 2;
377}
378#[repr(C)]
379#[derive(Debug, Copy, Clone)]
380pub struct __wasi_address_t {
381 pub buf: uint8_t_ptr,
382 pub buf_len: __wasi_size_t,
383}
384pub mod __wasi_sock_opt_level_t {
385 pub type Type = u32;
386 pub const __WASI_SOCK_OPT_LEVEL_SOL_SOCKET: Type = 0;
387}
388pub mod __wasi_sock_opt_so_t {
389 pub type Type = u32;
390 pub const __WASI_SOCK_OPT_SO_REUSEADDR: Type = 0;
391 pub const __WASI_SOCK_OPT_SO_TYPE: Type = 1;
392 pub const __WASI_SOCK_OPT_SO_ERROR: Type = 2;
393 pub const __WASI_SOCK_OPT_SO_DONTROUTE: Type = 3;
394 pub const __WASI_SOCK_OPT_SO_BROADCAST: Type = 4;
395 pub const __WASI_SOCK_OPT_SO_SNDBUF: Type = 5;
396 pub const __WASI_SOCK_OPT_SO_RCVBUF: Type = 6;
397 pub const __WASI_SOCK_OPT_SO_KEEPALIVE: Type = 7;
398 pub const __WASI_SOCK_OPT_SO_OOBINLINE: Type = 8;
399 pub const __WASI_SOCK_OPT_SO_LINGER: Type = 9;
400 pub const __WASI_SOCK_OPT_SO_RCVLOWAT: Type = 10;
401 pub const __WASI_SOCK_OPT_SO_RCVTIMEO: Type = 11;
402 pub const __WASI_SOCK_OPT_SO_SNDTIMEO: Type = 12;
403 pub const __WASI_SOCK_OPT_SO_ACCEPTCONN: Type = 13;
404 pub const __WASI_SOCK_OPT_SO_BINDTODEVICE: Type = 14;
405}
406pub mod __wasi_aiflags_t {
407 pub type Type = u16;
408 pub const __WASI_AIFLAGS_AI_PASSIVE: Type = 1;
409 pub const __WASI_AIFLAGS_AI_CANONNAME: Type = 2;
410 pub const __WASI_AIFLAGS_AI_NUMERICHOST: Type = 4;
411 pub const __WASI_AIFLAGS_AI_NUMERICSERV: Type = 8;
412 pub const __WASI_AIFLAGS_AI_V4MAPPED: Type = 16;
413 pub const __WASI_AIFLAGS_AI_ALL: Type = 32;
414 pub const __WASI_AIFLAGS_AI_ADDRCONFIG: Type = 64;
415}
416pub mod __wasi_sock_type_t {
417 pub type Type = u8;
418 pub const __WASI_SOCK_TYPE_SOCK_ANY: Type = 0;
419 pub const __WASI_SOCK_TYPE_SOCK_DGRAM: Type = 1;
420 pub const __WASI_SOCK_TYPE_SOCK_STREAM: Type = 2;
421}
422pub mod __wasi_protocol_t {
423 pub type Type = u8;
424 pub const __WASI_PROTOCOL_IPPROTO_IP: Type = 0;
425 pub const __WASI_PROTOCOL_IPPROTO_TCP: Type = 1;
426 pub const __WASI_PROTOCOL_IPPROTO_UDP: Type = 2;
427}
428#[repr(C)]
429#[derive(Debug, Copy, Clone)]
430pub struct __wasi_sockaddr_in_t {
431 pub sin_family: __wasi_address_family_t::Type,
432 pub sin_port: u16,
433 pub sin_addr: __wasi_address_t,
434 pub sin_zero_len: __wasi_size_t,
435 pub sin_zero: uint8_t_ptr,
436}
437#[repr(C)]
438#[derive(Debug, Copy, Clone)]
439pub struct __wasi_sockaddr_t {
440 pub sa_family: __wasi_address_family_t::Type,
441 pub sa_data_len: __wasi_size_t,
442 pub sa_data: uint8_t_ptr,
443}
444#[repr(C)]
445#[derive(Debug, Copy, Clone)]
446pub struct __wasi_addrinfo_t {
447 pub ai_flags: __wasi_aiflags_t::Type,
448 pub ai_family: __wasi_address_family_t::Type,
449 pub ai_socktype: __wasi_sock_type_t::Type,
450 pub ai_protocol: __wasi_protocol_t::Type,
451 pub ai_addrlen: __wasi_size_t,
452 pub ai_addr: uint8_t_ptr,
453 pub ai_canonname: uint8_t_ptr,
454 pub ai_canonname_len: __wasi_size_t,
455 pub ai_next: uint8_t_ptr,
456}
457pub mod __wasi_riflags_t {
458 pub type Type = u16;
459 pub const __WASI_RIFLAGS_RECV_PEEK: Type = 1;
460 pub const __WASI_RIFLAGS_RECV_WAITALL: Type = 2;
461}
462pub mod __wasi_roflags_t {
463 pub type Type = u16;
464 pub const __WASI_ROFLAGS_RECV_DATA_TRUNCATED: Type = 1;
465}
466pub type __wasi_siflags_t = u16;
467pub mod __wasi_sdflags_t {
468 pub type Type = u8;
469 pub const __WASI_SDFLAGS_RD: Type = 1;
470 pub const __WASI_SDFLAGS_WR: Type = 2;
471}
472pub mod __wasi_preopentype_t {
473 pub type Type = u8;
474 pub const __WASI_PREOPENTYPE_DIR: Type = 0;
475}
476#[repr(C)]
477#[derive(Debug, Copy, Clone)]
478pub struct __wasi_prestat_dir_t {
479 pub pr_name_len: __wasi_size_t,
480}
481#[repr(C)]
482#[derive(Copy, Clone)]
483pub union __wasi_prestat_u_t {
484 pub dir: __wasi_prestat_dir_t,
485}
486impl ::std::fmt::Debug for __wasi_prestat_u_t {
487 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
488 write!(f, "__wasi_prestat_u_t {{ union }}")
489 }
490}
491#[repr(C)]
492#[derive(Copy, Clone)]
493pub struct __wasi_prestat_t {
494 pub tag: __wasi_preopentype_t::Type,
495 pub u: __wasi_prestat_u_t,
496}
497impl ::std::fmt::Debug for __wasi_prestat_t {
498 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
499 write!(
500 f,
501 "__wasi_prestat_t {{ tag: {:?}, u: {:?} }}",
502 self.tag, self.u
503 )
504 }
505}
506
507#[repr(C)]
508#[derive(Copy, Clone)]
509pub struct __wasi_timeval {
510 pub tv_sec: i64,
511 pub tv_usec: i64,
512}